1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. vpc
  5. FlowLog
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.vpc.FlowLog

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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:

    LogStoreName string
    The name of the logstore.
    ProjectName string
    The name of the project.
    ResourceId string
    The ID of the resource.
    ResourceType 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.
    TrafficType string
    The type of traffic collected. Valid values:All: All traffic.Allow: Access control allowedtraffic.Drop: Access control denied traffic.
    AggregationInterval string
    Data aggregation interval.
    Description string
    The Description of the VPC Flow Log.
    FlowLogName string
    The Name of the VPC Flow Log.
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the VPC Flow Log. Valid values: Active and Inactive.
    Tags Dictionary<string, string>
    The tag of the current instance resource.
    TrafficPaths List<string>
    The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.
    LogStoreName string
    The name of the logstore.
    ProjectName string
    The name of the project.
    ResourceId string
    The ID of the resource.
    ResourceType 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.
    TrafficType string
    The type of traffic collected. Valid values:All: All traffic.Allow: Access control allowedtraffic.Drop: Access control denied traffic.
    AggregationInterval string
    Data aggregation interval.
    Description string
    The Description of the VPC Flow Log.
    FlowLogName string
    The Name of the VPC Flow Log.
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the VPC Flow Log. Valid values: Active and Inactive.
    Tags map[string]string
    The tag of the current instance resource.
    TrafficPaths []string
    The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.
    logStoreName String
    The name of the logstore.
    projectName String
    The name of the project.
    resourceId String
    The ID of the resource.
    resourceType 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.
    trafficType String
    The type of traffic collected. Valid values:All: All traffic.Allow: Access control allowedtraffic.Drop: Access control denied traffic.
    aggregationInterval String
    Data aggregation interval.
    description String
    The Description of the VPC Flow Log.
    flowLogName String
    The Name of the VPC Flow Log.
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the VPC Flow Log. Valid values: Active and Inactive.
    tags Map<String,String>
    The tag of the current instance resource.
    trafficPaths List<String>
    The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.
    logStoreName string
    The name of the logstore.
    projectName string
    The name of the project.
    resourceId string
    The ID of the resource.
    resourceType 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.
    trafficType string
    The type of traffic collected. Valid values:All: All traffic.Allow: Access control allowedtraffic.Drop: Access control denied traffic.
    aggregationInterval string
    Data aggregation interval.
    description string
    The Description of the VPC Flow Log.
    flowLogName string
    The Name of the VPC Flow Log.
    resourceGroupId string
    The ID of the resource group.
    status string
    The status of the VPC Flow Log. Valid values: Active and Inactive.
    tags {[key: string]: string}
    The tag of the current instance resource.
    trafficPaths string[]
    The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.
    log_store_name str
    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_name str
    The Name of the VPC Flow Log.
    resource_group_id str
    The ID of the resource group.
    status str
    The status of the VPC Flow Log. Valid values: Active and Inactive.
    tags 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.
    logStoreName String
    The name of the logstore.
    projectName String
    The name of the project.
    resourceId String
    The ID of the resource.
    resourceType 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.
    trafficType String
    The type of traffic collected. Valid values:All: All traffic.Allow: Access control allowedtraffic.Drop: Access control denied traffic.
    aggregationInterval String
    Data aggregation interval.
    description String
    The Description of the VPC Flow Log.
    flowLogName String
    The Name of the VPC Flow Log.
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the VPC Flow Log. Valid values: Active and Inactive.
    tags Map<String>
    The tag of the current instance resource.
    trafficPaths 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:

    BusinessStatus string
    Business status.
    CreateTime string
    Creation time.
    FlowLogId string
    The flow log ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    BusinessStatus string
    Business status.
    CreateTime string
    Creation time.
    FlowLogId string
    The flow log ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    businessStatus String
    Business status.
    createTime String
    Creation time.
    flowLogId String
    The flow log ID.
    id String
    The provider-assigned unique ID for this managed resource.
    businessStatus string
    Business status.
    createTime string
    Creation time.
    flowLogId string
    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_id str
    The flow log ID.
    id str
    The provider-assigned unique ID for this managed resource.
    businessStatus String
    Business status.
    createTime String
    Creation time.
    flowLogId String
    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.
    The following state arguments are supported:
    AggregationInterval string
    Data aggregation interval.
    BusinessStatus string
    Business status.
    CreateTime string
    Creation time.
    Description string
    The Description of the VPC Flow Log.
    FlowLogId string
    The flow log ID.
    FlowLogName string
    The Name of the VPC Flow Log.
    LogStoreName string
    The name of the logstore.
    ProjectName string
    The name of the project.
    ResourceGroupId string
    The ID of the resource group.
    ResourceId string
    The ID of the resource.
    ResourceType 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.
    Tags Dictionary<string, string>
    The tag of the current instance resource.
    TrafficPaths List<string>
    The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.
    TrafficType string
    The type of traffic collected. Valid values:All: All traffic.Allow: Access control allowedtraffic.Drop: Access control denied traffic.
    AggregationInterval string
    Data aggregation interval.
    BusinessStatus string
    Business status.
    CreateTime string
    Creation time.
    Description string
    The Description of the VPC Flow Log.
    FlowLogId string
    The flow log ID.
    FlowLogName string
    The Name of the VPC Flow Log.
    LogStoreName string
    The name of the logstore.
    ProjectName string
    The name of the project.
    ResourceGroupId string
    The ID of the resource group.
    ResourceId string
    The ID of the resource.
    ResourceType 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.
    Tags map[string]string
    The tag of the current instance resource.
    TrafficPaths []string
    The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.
    TrafficType string
    The type of traffic collected. Valid values:All: All traffic.Allow: Access control allowedtraffic.Drop: Access control denied traffic.
    aggregationInterval String
    Data aggregation interval.
    businessStatus String
    Business status.
    createTime String
    Creation time.
    description String
    The Description of the VPC Flow Log.
    flowLogId String
    The flow log ID.
    flowLogName String
    The Name of the VPC Flow Log.
    logStoreName String
    The name of the logstore.
    projectName String
    The name of the project.
    resourceGroupId String
    The ID of the resource group.
    resourceId String
    The ID of the resource.
    resourceType 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.
    tags Map<String,String>
    The tag of the current instance resource.
    trafficPaths List<String>
    The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.
    trafficType String
    The type of traffic collected. Valid values:All: All traffic.Allow: Access control allowedtraffic.Drop: Access control denied traffic.
    aggregationInterval string
    Data aggregation interval.
    businessStatus string
    Business status.
    createTime string
    Creation time.
    description string
    The Description of the VPC Flow Log.
    flowLogId string
    The flow log ID.
    flowLogName string
    The Name of the VPC Flow Log.
    logStoreName string
    The name of the logstore.
    projectName string
    The name of the project.
    resourceGroupId string
    The ID of the resource group.
    resourceId string
    The ID of the resource.
    resourceType 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.
    tags {[key: string]: string}
    The tag of the current instance resource.
    trafficPaths string[]
    The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.
    trafficType 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_id str
    The flow log ID.
    flow_log_name str
    The Name of the VPC Flow Log.
    log_store_name str
    The name of the logstore.
    project_name str
    The name of the project.
    resource_group_id str
    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.
    tags 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.
    aggregationInterval String
    Data aggregation interval.
    businessStatus String
    Business status.
    createTime String
    Creation time.
    description String
    The Description of the VPC Flow Log.
    flowLogId String
    The flow log ID.
    flowLogName String
    The Name of the VPC Flow Log.
    logStoreName String
    The name of the logstore.
    projectName String
    The name of the project.
    resourceGroupId String
    The ID of the resource group.
    resourceId String
    The ID of the resource.
    resourceType 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.
    tags Map<String>
    The tag of the current instance resource.
    trafficPaths List<String>
    The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.
    trafficType 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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi