alicloud.vpc.FlowLog
Explore with Pulumi AI
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 since v1.117.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
import * as std from "@pulumi/std";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = alicloud.resourcemanager.getResourceGroups({
status: "OK",
});
const example = new alicloud.vpc.Network("example", {
vpcName: name,
cidrBlock: "10.4.0.0/16",
});
const exampleUuid = new random.index.Uuid("example", {});
const exampleProject = new alicloud.log.Project("example", {
projectName: std.replace({
text: exampleUuid.result,
search: "-",
replace: "",
}).then(invoke => std.substr({
input: `tf-example-${invoke.result}`,
offset: 0,
length: 16,
})).then(invoke => invoke.result),
description: name,
});
const exampleStore = new alicloud.log.Store("example", {
projectName: exampleProject.projectName,
logstoreName: name,
shardCount: 3,
autoSplit: true,
maxSplitShardCount: 60,
appendMeta: true,
});
const exampleFlowLog = new alicloud.vpc.FlowLog("example", {
flowLogName: name,
logStoreName: exampleStore.logstoreName,
description: name,
trafficPaths: ["all"],
projectName: exampleProject.projectName,
resourceType: "VPC",
resourceGroupId: _default.then(_default => _default.ids?.[0]),
resourceId: example.id,
aggregationInterval: "1",
trafficType: "All",
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
import pulumi_std as std
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.resourcemanager.get_resource_groups(status="OK")
example = alicloud.vpc.Network("example",
vpc_name=name,
cidr_block="10.4.0.0/16")
example_uuid = random.index.Uuid("example")
example_project = alicloud.log.Project("example",
project_name=std.substr(input=f"tf-example-{std.replace(text=example_uuid['result'],
search='-',
replace='').result}",
offset=0,
length=16).result,
description=name)
example_store = alicloud.log.Store("example",
project_name=example_project.project_name,
logstore_name=name,
shard_count=3,
auto_split=True,
max_split_shard_count=60,
append_meta=True)
example_flow_log = alicloud.vpc.FlowLog("example",
flow_log_name=name,
log_store_name=example_store.logstore_name,
description=name,
traffic_paths=["all"],
project_name=example_project.project_name,
resource_type="VPC",
resource_group_id=default.ids[0],
resource_id=example.id,
aggregation_interval="1",
traffic_type="All")
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
Status: pulumi.StringRef("OK"),
}, nil)
if err != nil {
return err
}
example, err := vpc.NewNetwork(ctx, "example", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/16"),
})
if err != nil {
return err
}
exampleUuid, err := random.NewUuid(ctx, "example", nil)
if err != nil {
return err
}
invokeSubstr, err := std.Substr(ctx, &std.SubstrArgs{
Input: fmt.Sprintf("tf-example-%v", std.Replace(ctx, &std.ReplaceArgs{
Text: exampleUuid.Result,
Search: "-",
Replace: "",
}, nil).Result),
Offset: 0,
Length: 16,
}, nil)
if err != nil {
return err
}
exampleProject, err := log.NewProject(ctx, "example", &log.ProjectArgs{
ProjectName: pulumi.String(invokeSubstr.Result),
Description: pulumi.String(name),
})
if err != nil {
return err
}
exampleStore, err := log.NewStore(ctx, "example", &log.StoreArgs{
ProjectName: exampleProject.ProjectName,
LogstoreName: pulumi.String(name),
ShardCount: pulumi.Int(3),
AutoSplit: pulumi.Bool(true),
MaxSplitShardCount: pulumi.Int(60),
AppendMeta: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = vpc.NewFlowLog(ctx, "example", &vpc.FlowLogArgs{
FlowLogName: pulumi.String(name),
LogStoreName: exampleStore.LogstoreName,
Description: pulumi.String(name),
TrafficPaths: pulumi.StringArray{
pulumi.String("all"),
},
ProjectName: exampleProject.ProjectName,
ResourceType: pulumi.String("VPC"),
ResourceGroupId: pulumi.String(_default.Ids[0]),
ResourceId: example.ID(),
AggregationInterval: pulumi.String("1"),
TrafficType: pulumi.String("All"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
{
Status = "OK",
});
var example = new AliCloud.Vpc.Network("example", new()
{
VpcName = name,
CidrBlock = "10.4.0.0/16",
});
var exampleUuid = new Random.Index.Uuid("example");
var exampleProject = new AliCloud.Log.Project("example", new()
{
ProjectName = Std.Replace.Invoke(new()
{
Text = exampleUuid.Result,
Search = "-",
Replace = "",
}).Apply(invoke => Std.Substr.Invoke(new()
{
Input = $"tf-example-{invoke.Result}",
Offset = 0,
Length = 16,
})).Apply(invoke => invoke.Result),
Description = name,
});
var exampleStore = new AliCloud.Log.Store("example", new()
{
ProjectName = exampleProject.ProjectName,
LogstoreName = name,
ShardCount = 3,
AutoSplit = true,
MaxSplitShardCount = 60,
AppendMeta = true,
});
var exampleFlowLog = new AliCloud.Vpc.FlowLog("example", new()
{
FlowLogName = name,
LogStoreName = exampleStore.LogstoreName,
Description = name,
TrafficPaths = new[]
{
"all",
},
ProjectName = exampleProject.ProjectName,
ResourceType = "VPC",
ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
ResourceId = example.Id,
AggregationInterval = "1",
TrafficType = "All",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.random.Uuid;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.ReplaceArgs;
import com.pulumi.std.inputs.SubstrArgs;
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-example");
final var default = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.status("OK")
.build());
var example = new Network("example", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var exampleUuid = new Uuid("exampleUuid");
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.projectName(StdFunctions.substr(SubstrArgs.builder()
.input(String.format("tf-example-%s", StdFunctions.replace(ReplaceArgs.builder()
.text(exampleUuid.result())
.search("-")
.replace("")
.build()).result()))
.offset(0)
.length(16)
.build()).result())
.description(name)
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.projectName(exampleProject.projectName())
.logstoreName(name)
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var exampleFlowLog = new FlowLog("exampleFlowLog", FlowLogArgs.builder()
.flowLogName(name)
.logStoreName(exampleStore.logstoreName())
.description(name)
.trafficPaths("all")
.projectName(exampleProject.projectName())
.resourceType("VPC")
.resourceGroupId(default_.ids()[0])
.resourceId(example.id())
.aggregationInterval("1")
.trafficType("All")
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
example:
type: alicloud:vpc:Network
properties:
vpcName: ${name}
cidrBlock: 10.4.0.0/16
exampleUuid:
type: random:Uuid
name: example
exampleProject:
type: alicloud:log:Project
name: example
properties:
projectName:
fn::invoke:
function: std:substr
arguments:
input:
fn::join:
- ""
- - tf-example-
- fn::invoke:
function: std:replace
arguments:
text: ${exampleUuid.result}
search: '-'
replace: ""
return: result
offset: 0
length: 16
return: result
description: ${name}
exampleStore:
type: alicloud:log:Store
name: example
properties:
projectName: ${exampleProject.projectName}
logstoreName: ${name}
shardCount: 3
autoSplit: true
maxSplitShardCount: 60
appendMeta: true
exampleFlowLog:
type: alicloud:vpc:FlowLog
name: example
properties:
flowLogName: ${name}
logStoreName: ${exampleStore.logstoreName}
description: ${name}
trafficPaths:
- all
projectName: ${exampleProject.projectName}
resourceType: VPC
resourceGroupId: ${default.ids[0]}
resourceId: ${example.id}
aggregationInterval: '1'
trafficType: All
variables:
default:
fn::invoke:
function: alicloud:resourcemanager:getResourceGroups
arguments:
status: OK
Create FlowLog Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FlowLog(name: string, args: FlowLogArgs, opts?: CustomResourceOptions);
@overload
def FlowLog(resource_name: str,
args: FlowLogArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FlowLog(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_name: Optional[str] = None,
traffic_type: Optional[str] = None,
resource_type: Optional[str] = None,
resource_id: Optional[str] = None,
log_store_name: Optional[str] = None,
resource_group_id: Optional[str] = None,
aggregation_interval: Optional[str] = None,
ip_version: Optional[str] = None,
flow_log_name: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
traffic_paths: Optional[Sequence[str]] = None,
description: Optional[str] = None)
func NewFlowLog(ctx *Context, name string, args FlowLogArgs, opts ...ResourceOption) (*FlowLog, error)
public FlowLog(string name, FlowLogArgs args, CustomResourceOptions? opts = null)
public FlowLog(String name, FlowLogArgs args)
public FlowLog(String name, FlowLogArgs args, CustomResourceOptions options)
type: alicloud:vpc:FlowLog
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FlowLogArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FlowLogArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FlowLogArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FlowLogArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FlowLogArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var alicloudFlowLogResource = new AliCloud.Vpc.FlowLog("alicloudFlowLogResource", new()
{
ProjectName = "string",
TrafficType = "string",
ResourceType = "string",
ResourceId = "string",
LogStoreName = "string",
ResourceGroupId = "string",
AggregationInterval = "string",
IpVersion = "string",
FlowLogName = "string",
Status = "string",
Tags =
{
{ "string", "string" },
},
TrafficPaths = new[]
{
"string",
},
Description = "string",
});
example, err := vpc.NewFlowLog(ctx, "alicloudFlowLogResource", &vpc.FlowLogArgs{
ProjectName: pulumi.String("string"),
TrafficType: pulumi.String("string"),
ResourceType: pulumi.String("string"),
ResourceId: pulumi.String("string"),
LogStoreName: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
AggregationInterval: pulumi.String("string"),
IpVersion: pulumi.String("string"),
FlowLogName: pulumi.String("string"),
Status: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TrafficPaths: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
})
var alicloudFlowLogResource = new com.pulumi.alicloud.vpc.FlowLog("alicloudFlowLogResource", com.pulumi.alicloud.vpc.FlowLogArgs.builder()
.projectName("string")
.trafficType("string")
.resourceType("string")
.resourceId("string")
.logStoreName("string")
.resourceGroupId("string")
.aggregationInterval("string")
.ipVersion("string")
.flowLogName("string")
.status("string")
.tags(Map.of("string", "string"))
.trafficPaths("string")
.description("string")
.build());
alicloud_flow_log_resource = alicloud.vpc.FlowLog("alicloudFlowLogResource",
project_name="string",
traffic_type="string",
resource_type="string",
resource_id="string",
log_store_name="string",
resource_group_id="string",
aggregation_interval="string",
ip_version="string",
flow_log_name="string",
status="string",
tags={
"string": "string",
},
traffic_paths=["string"],
description="string")
const alicloudFlowLogResource = new alicloud.vpc.FlowLog("alicloudFlowLogResource", {
projectName: "string",
trafficType: "string",
resourceType: "string",
resourceId: "string",
logStoreName: "string",
resourceGroupId: "string",
aggregationInterval: "string",
ipVersion: "string",
flowLogName: "string",
status: "string",
tags: {
string: "string",
},
trafficPaths: ["string"],
description: "string",
});
type: alicloud:vpc:FlowLog
properties:
aggregationInterval: string
description: string
flowLogName: string
ipVersion: string
logStoreName: string
projectName: string
resourceGroupId: string
resourceId: string
resourceType: string
status: string
tags:
string: string
trafficPaths:
- string
trafficType: string
FlowLog Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The FlowLog resource accepts the following input properties:
- Log
Store stringName - The Logstore that stores the captured traffic data.
- Project
Name string - The project that manages the captured traffic data.
- Resource
Id string - The ID of the resource.
- Resource
Type 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.
- Traffic
Type string - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- Aggregation
Interval string - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- Description string
- The Description of the VPC Flow Log.
- Flow
Log stringName - The Name of the VPC Flow Log.
- Ip
Version string - The IP address type of the collected traffic.
- Resource
Group stringId - The ID of the resource group.
- Status string
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - Dictionary<string, string>
- The tag of the current instance resource.
- Traffic
Paths List<string> - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- Log
Store stringName - The Logstore that stores the captured traffic data.
- Project
Name string - The project that manages the captured traffic data.
- Resource
Id string - The ID of the resource.
- Resource
Type 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.
- Traffic
Type string - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- Aggregation
Interval string - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- Description string
- The Description of the VPC Flow Log.
- Flow
Log stringName - The Name of the VPC Flow Log.
- Ip
Version string - The IP address type of the collected traffic.
- Resource
Group stringId - The ID of the resource group.
- Status string
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - map[string]string
- The tag of the current instance resource.
- Traffic
Paths []string - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- log
Store StringName - The Logstore that stores the captured traffic data.
- project
Name String - The project that manages the captured traffic data.
- resource
Id String - The ID of the resource.
- resource
Type 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.
- traffic
Type String - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- aggregation
Interval String - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- description String
- The Description of the VPC Flow Log.
- flow
Log StringName - The Name of the VPC Flow Log.
- ip
Version String - The IP address type of the collected traffic.
- resource
Group StringId - The ID of the resource group.
- status String
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - Map<String,String>
- The tag of the current instance resource.
- traffic
Paths List<String> - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- log
Store stringName - The Logstore that stores the captured traffic data.
- project
Name string - The project that manages the captured traffic data.
- resource
Id string - The ID of the resource.
- resource
Type 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.
- traffic
Type string - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- aggregation
Interval string - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- description string
- The Description of the VPC Flow Log.
- flow
Log stringName - The Name of the VPC Flow Log.
- ip
Version string - The IP address type of the collected traffic.
- resource
Group stringId - The ID of the resource group.
- status string
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - {[key: string]: string}
- The tag of the current instance resource.
- traffic
Paths string[] - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- log_
store_ strname - The Logstore that stores the captured traffic data.
- project_
name str - The project that manages the captured traffic data.
- resource_
id str - The ID of the resource.
- resource_
type str - 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.
- traffic_
type str - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- aggregation_
interval str - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- description str
- The Description of the VPC Flow Log.
- flow_
log_ strname - The Name of the VPC Flow Log.
- ip_
version str - The IP address type of the collected traffic.
- resource_
group_ strid - The ID of the resource group.
- status str
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - Mapping[str, str]
- The tag of the current instance resource.
- traffic_
paths Sequence[str] - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- log
Store StringName - The Logstore that stores the captured traffic data.
- project
Name String - The project that manages the captured traffic data.
- resource
Id String - The ID of the resource.
- resource
Type 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.
- traffic
Type String - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- aggregation
Interval String - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- description String
- The Description of the VPC Flow Log.
- flow
Log StringName - The Name of the VPC Flow Log.
- ip
Version String - The IP address type of the collected traffic.
- resource
Group StringId - The ID of the resource group.
- status String
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - Map<String>
- The tag of the current instance resource.
- traffic
Paths List<String> - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
Outputs
All input properties are implicitly available as output properties. Additionally, the FlowLog resource produces the following output properties:
- Business
Status string - Business status
- Create
Time string - Creation time
- Flow
Log stringId - The flow log ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - The region ID.
- Business
Status string - Business status
- Create
Time string - Creation time
- Flow
Log stringId - The flow log ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - The region ID.
- business
Status String - Business status
- create
Time String - Creation time
- flow
Log StringId - The flow log ID.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - The region ID.
- business
Status string - Business status
- create
Time string - Creation time
- flow
Log stringId - The flow log ID.
- id string
- The provider-assigned unique ID for this managed resource.
- region
Id string - The region ID.
- business_
status str - Business status
- create_
time str - Creation time
- flow_
log_ strid - The flow log ID.
- id str
- The provider-assigned unique ID for this managed resource.
- region_
id str - The region ID.
- business
Status String - Business status
- create
Time String - Creation time
- flow
Log StringId - The flow log ID.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - The region ID.
Look up Existing FlowLog Resource
Get an existing FlowLog resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FlowLogState, opts?: CustomResourceOptions): FlowLog
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
aggregation_interval: Optional[str] = None,
business_status: Optional[str] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
flow_log_id: Optional[str] = None,
flow_log_name: Optional[str] = None,
ip_version: Optional[str] = None,
log_store_name: Optional[str] = None,
project_name: Optional[str] = None,
region_id: Optional[str] = None,
resource_group_id: Optional[str] = None,
resource_id: Optional[str] = None,
resource_type: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
traffic_paths: Optional[Sequence[str]] = None,
traffic_type: Optional[str] = None) -> FlowLog
func GetFlowLog(ctx *Context, name string, id IDInput, state *FlowLogState, opts ...ResourceOption) (*FlowLog, error)
public static FlowLog Get(string name, Input<string> id, FlowLogState? state, CustomResourceOptions? opts = null)
public static FlowLog get(String name, Output<String> id, FlowLogState state, CustomResourceOptions options)
resources: _: type: alicloud:vpc:FlowLog get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Aggregation
Interval string - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- Business
Status string - Business status
- Create
Time string - Creation time
- Description string
- The Description of the VPC Flow Log.
- Flow
Log stringId - The flow log ID.
- Flow
Log stringName - The Name of the VPC Flow Log.
- Ip
Version string - The IP address type of the collected traffic.
- Log
Store stringName - The Logstore that stores the captured traffic data.
- Project
Name string - The project that manages the captured traffic data.
- Region
Id string - The region ID.
- Resource
Group stringId - The ID of the resource group.
- Resource
Id string - The ID of the resource.
- Resource
Type 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.
- Status string
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - Dictionary<string, string>
- The tag of the current instance resource.
- Traffic
Paths List<string> - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- Traffic
Type string - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- Aggregation
Interval string - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- Business
Status string - Business status
- Create
Time string - Creation time
- Description string
- The Description of the VPC Flow Log.
- Flow
Log stringId - The flow log ID.
- Flow
Log stringName - The Name of the VPC Flow Log.
- Ip
Version string - The IP address type of the collected traffic.
- Log
Store stringName - The Logstore that stores the captured traffic data.
- Project
Name string - The project that manages the captured traffic data.
- Region
Id string - The region ID.
- Resource
Group stringId - The ID of the resource group.
- Resource
Id string - The ID of the resource.
- Resource
Type 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.
- Status string
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - map[string]string
- The tag of the current instance resource.
- Traffic
Paths []string - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- Traffic
Type string - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- aggregation
Interval String - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- business
Status String - Business status
- create
Time String - Creation time
- description String
- The Description of the VPC Flow Log.
- flow
Log StringId - The flow log ID.
- flow
Log StringName - The Name of the VPC Flow Log.
- ip
Version String - The IP address type of the collected traffic.
- log
Store StringName - The Logstore that stores the captured traffic data.
- project
Name String - The project that manages the captured traffic data.
- region
Id String - The region ID.
- resource
Group StringId - The ID of the resource group.
- resource
Id String - The ID of the resource.
- resource
Type 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.
- status String
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - Map<String,String>
- The tag of the current instance resource.
- traffic
Paths List<String> - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- traffic
Type String - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- aggregation
Interval string - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- business
Status string - Business status
- create
Time string - Creation time
- description string
- The Description of the VPC Flow Log.
- flow
Log stringId - The flow log ID.
- flow
Log stringName - The Name of the VPC Flow Log.
- ip
Version string - The IP address type of the collected traffic.
- log
Store stringName - The Logstore that stores the captured traffic data.
- project
Name string - The project that manages the captured traffic data.
- region
Id string - The region ID.
- resource
Group stringId - The ID of the resource group.
- resource
Id string - The ID of the resource.
- resource
Type 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.
- status string
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - {[key: string]: string}
- The tag of the current instance resource.
- traffic
Paths string[] - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- traffic
Type string - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- aggregation_
interval str - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- business_
status str - Business status
- create_
time str - Creation time
- description str
- The Description of the VPC Flow Log.
- flow_
log_ strid - The flow log ID.
- flow_
log_ strname - The Name of the VPC Flow Log.
- ip_
version str - The IP address type of the collected traffic.
- log_
store_ strname - The Logstore that stores the captured traffic data.
- project_
name str - The project that manages the captured traffic data.
- region_
id str - The region ID.
- resource_
group_ strid - The ID of the resource group.
- resource_
id str - The ID of the resource.
- resource_
type str - 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.
- status str
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - Mapping[str, str]
- The tag of the current instance resource.
- traffic_
paths Sequence[str] - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- traffic_
type str - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
- aggregation
Interval String - The sampling interval of the flow log. Unit: seconds. Valid values: 1, 5, and 10 (default).
- business
Status String - Business status
- create
Time String - Creation time
- description String
- The Description of the VPC Flow Log.
- flow
Log StringId - The flow log ID.
- flow
Log StringName - The Name of the VPC Flow Log.
- ip
Version String - The IP address type of the collected traffic.
- log
Store StringName - The Logstore that stores the captured traffic data.
- project
Name String - The project that manages the captured traffic data.
- region
Id String - The region ID.
- resource
Group StringId - The ID of the resource group.
- resource
Id String - The ID of the resource.
- resource
Type 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.
- status String
- The status of the VPC Flow Log. Valid values:
Active
andInactive
. - Map<String>
- The tag of the current instance resource.
- traffic
Paths List<String> - The collected flow path. Value:
- all*: indicates full acquisition.
- internetGateway*: indicates public network traffic collection.
- traffic
Type String - The type of traffic collected. Valid values:
- All*: All traffic.
- Allow*: Access control allowedtraffic.
- Drop*: Access control denied traffic.
Import
VPC Flow Log can be imported using the id, e.g.
$ pulumi import alicloud:vpc/flowLog:FlowLog example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.