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.
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,
log_store_name: Optional[str] = None,
project_name: Optional[str] = None,
resource_id: Optional[str] = None,
resource_type: Optional[str] = None,
traffic_type: Optional[str] = None,
aggregation_interval: Optional[str] = None,
description: Optional[str] = None,
flow_log_name: Optional[str] = None,
resource_group_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
traffic_paths: Optional[Sequence[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()
{
LogStoreName = "string",
ProjectName = "string",
ResourceId = "string",
ResourceType = "string",
TrafficType = "string",
AggregationInterval = "string",
Description = "string",
FlowLogName = "string",
ResourceGroupId = "string",
Status = "string",
Tags =
{
{ "string", "string" },
},
TrafficPaths = new[]
{
"string",
},
});
example, err := vpc.NewFlowLog(ctx, "alicloudFlowLogResource", &vpc.FlowLogArgs{
LogStoreName: pulumi.String("string"),
ProjectName: pulumi.String("string"),
ResourceId: pulumi.String("string"),
ResourceType: pulumi.String("string"),
TrafficType: pulumi.String("string"),
AggregationInterval: pulumi.String("string"),
Description: pulumi.String("string"),
FlowLogName: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
Status: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TrafficPaths: pulumi.StringArray{
pulumi.String("string"),
},
})
var alicloudFlowLogResource = new FlowLog("alicloudFlowLogResource", FlowLogArgs.builder()
.logStoreName("string")
.projectName("string")
.resourceId("string")
.resourceType("string")
.trafficType("string")
.aggregationInterval("string")
.description("string")
.flowLogName("string")
.resourceGroupId("string")
.status("string")
.tags(Map.of("string", "string"))
.trafficPaths("string")
.build());
alicloud_flow_log_resource = alicloud.vpc.FlowLog("alicloudFlowLogResource",
log_store_name="string",
project_name="string",
resource_id="string",
resource_type="string",
traffic_type="string",
aggregation_interval="string",
description="string",
flow_log_name="string",
resource_group_id="string",
status="string",
tags={
"string": "string",
},
traffic_paths=["string"])
const alicloudFlowLogResource = new alicloud.vpc.FlowLog("alicloudFlowLogResource", {
logStoreName: "string",
projectName: "string",
resourceId: "string",
resourceType: "string",
trafficType: "string",
aggregationInterval: "string",
description: "string",
flowLogName: "string",
resourceGroupId: "string",
status: "string",
tags: {
string: "string",
},
trafficPaths: ["string"],
});
type: alicloud:vpc:FlowLog
properties:
aggregationInterval: string
description: string
flowLogName: 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 name of the logstore.
- Project
Name string - The name of the project.
- 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 - Data aggregation interval.
- Description string
- The Description of the VPC Flow Log.
- Flow
Log stringName - The Name of the VPC Flow Log.
- Resource
Group stringId - The ID of the resource group.
- Status string
- The status of the VPC Flow Log. Valid values: Active and Inactive.
- 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 name of the logstore.
- Project
Name string - The name of the project.
- 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 - Data aggregation interval.
- Description string
- The Description of the VPC Flow Log.
- Flow
Log stringName - The Name of the VPC Flow Log.
- Resource
Group stringId - The ID of the resource group.
- Status string
- The status of the VPC Flow Log. Valid values: Active and Inactive.
- 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 name of the logstore.
- project
Name String - The name of the project.
- 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 - Data aggregation interval.
- description String
- The Description of the VPC Flow Log.
- flow
Log StringName - The Name of the VPC Flow Log.
- resource
Group StringId - The ID of the resource group.
- status String
- The status of the VPC Flow Log. Valid values: Active and Inactive.
- 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 name of the logstore.
- project
Name string - The name of the project.
- 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 - Data aggregation interval.
- description string
- The Description of the VPC Flow Log.
- flow
Log stringName - The Name of the VPC Flow Log.
- resource
Group stringId - The ID of the resource group.
- status string
- The status of the VPC Flow Log. Valid values: Active and Inactive.
- {[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 name of the logstore.
- project_
name str - The name of the project.
- 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 - Data aggregation interval.
- description str
- The Description of the VPC Flow Log.
- flow_
log_ strname - The Name of the VPC Flow Log.
- resource_
group_ strid - The ID of the resource group.
- status str
- The status of the VPC Flow Log. Valid values: Active and Inactive.
- 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 name of the logstore.
- project
Name String - The name of the project.
- 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 - Data aggregation interval.
- description String
- The Description of the VPC Flow Log.
- flow
Log StringName - The Name of the VPC Flow Log.
- resource
Group StringId - The ID of the resource group.
- status String
- The status of the VPC Flow Log. Valid values: Active and Inactive.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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,
log_store_name: Optional[str] = None,
project_name: 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)
Resource lookup is not supported in YAML
- 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 - Data aggregation interval.
- 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.
- Log
Store stringName - The name of the logstore.
- Project
Name string - The name of the project.
- 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 and Inactive.
- 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 - Data aggregation interval.
- 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.
- Log
Store stringName - The name of the logstore.
- Project
Name string - The name of the project.
- 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 and Inactive.
- 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 - Data aggregation interval.
- 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.
- log
Store StringName - The name of the logstore.
- project
Name String - The name of the project.
- 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 and Inactive.
- 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 - Data aggregation interval.
- 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.
- log
Store stringName - The name of the logstore.
- project
Name string - The name of the project.
- 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 and Inactive.
- {[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 - Data aggregation interval.
- 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.
- log_
store_ strname - The name of the logstore.
- project_
name str - The name of the project.
- 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 and Inactive.
- 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 - Data aggregation interval.
- 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.
- log
Store StringName - The name of the logstore.
- project
Name String - The name of the project.
- 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 and Inactive.
- 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.