# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs

__all__ = [
    'GetFlowLogResult',
    'AwaitableGetFlowLogResult',
    'get_flow_log',
    'get_flow_log_output',
]

@pulumi.output_type
class GetFlowLogResult:
    """
    A collection of values returned by getFlowLog.
    """
    def __init__(__self__, aggregation_interval=None, business_status=None, created_at=None, description=None, enable_index=None, flow_log_id=None, flow_log_name=None, id=None, lock_reason=None, log_project_id=None, log_project_name=None, log_topic_id=None, log_topic_name=None, project_name=None, resource_id=None, resource_type=None, status=None, tags=None, traffic_type=None, updated_at=None, vpc_id=None):
        if aggregation_interval and not isinstance(aggregation_interval, int):
            raise TypeError("Expected argument 'aggregation_interval' to be a int")
        pulumi.set(__self__, "aggregation_interval", aggregation_interval)
        if business_status and not isinstance(business_status, str):
            raise TypeError("Expected argument 'business_status' to be a str")
        pulumi.set(__self__, "business_status", business_status)
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if enable_index and not isinstance(enable_index, bool):
            raise TypeError("Expected argument 'enable_index' to be a bool")
        pulumi.set(__self__, "enable_index", enable_index)
        if flow_log_id and not isinstance(flow_log_id, str):
            raise TypeError("Expected argument 'flow_log_id' to be a str")
        pulumi.set(__self__, "flow_log_id", flow_log_id)
        if flow_log_name and not isinstance(flow_log_name, str):
            raise TypeError("Expected argument 'flow_log_name' to be a str")
        pulumi.set(__self__, "flow_log_name", flow_log_name)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if lock_reason and not isinstance(lock_reason, str):
            raise TypeError("Expected argument 'lock_reason' to be a str")
        pulumi.set(__self__, "lock_reason", lock_reason)
        if log_project_id and not isinstance(log_project_id, str):
            raise TypeError("Expected argument 'log_project_id' to be a str")
        pulumi.set(__self__, "log_project_id", log_project_id)
        if log_project_name and not isinstance(log_project_name, str):
            raise TypeError("Expected argument 'log_project_name' to be a str")
        pulumi.set(__self__, "log_project_name", log_project_name)
        if log_topic_id and not isinstance(log_topic_id, str):
            raise TypeError("Expected argument 'log_topic_id' to be a str")
        pulumi.set(__self__, "log_topic_id", log_topic_id)
        if log_topic_name and not isinstance(log_topic_name, str):
            raise TypeError("Expected argument 'log_topic_name' to be a str")
        pulumi.set(__self__, "log_topic_name", log_topic_name)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if resource_id and not isinstance(resource_id, str):
            raise TypeError("Expected argument 'resource_id' to be a str")
        pulumi.set(__self__, "resource_id", resource_id)
        if resource_type and not isinstance(resource_type, str):
            raise TypeError("Expected argument 'resource_type' to be a str")
        pulumi.set(__self__, "resource_type", resource_type)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if traffic_type and not isinstance(traffic_type, str):
            raise TypeError("Expected argument 'traffic_type' to be a str")
        pulumi.set(__self__, "traffic_type", traffic_type)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)
        if vpc_id and not isinstance(vpc_id, str):
            raise TypeError("Expected argument 'vpc_id' to be a str")
        pulumi.set(__self__, "vpc_id", vpc_id)

    @property
    @pulumi.getter(name="aggregationInterval")
    def aggregation_interval(self) -> builtins.int:
        """
        流日志的采样间隔。取值如下。1：1分钟。5：5分钟。10（默认值）：10分钟。
        """
        return pulumi.get(self, "aggregation_interval")

    @property
    @pulumi.getter(name="businessStatus")
    def business_status(self) -> builtins.str:
        """
        流日志是否被锁定。Normal: 正常。FinancialLocked: 被锁定。
        """
        return pulumi.get(self, "business_status")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> builtins.str:
        """
        流日志的创建时间。
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        流日志的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号（,）、点号（.）、下划线（_）、空格（ ）、等号（=）、短横线（-）、中文逗号（，）、中文句号（。）。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="enableIndex")
    def enable_index(self) -> builtins.bool:
        """
        是否自动配置索引。索引用于检索分析数据，流日志在检索分析之前，必须先配置索引。true：是。false（默认值）：否。
        """
        return pulumi.get(self, "enable_index")

    @property
    @pulumi.getter(name="flowLogId")
    def flow_log_id(self) -> builtins.str:
        """
        流日志的ID。
        """
        return pulumi.get(self, "flow_log_id")

    @property
    @pulumi.getter(name="flowLogName")
    def flow_log_name(self) -> builtins.str:
        """
        流日志的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头，可包含点号（.）、下划线（_）和短横线（-）。不填默认为流日志实例的ID。
        """
        return pulumi.get(self, "flow_log_name")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="lockReason")
    def lock_reason(self) -> builtins.str:
        """
        流日志被锁定的原因。financial: 因欠费被锁定。unlock：欠费关停后充值恢复过程中。空值 : 没有被锁定。
        """
        return pulumi.get(self, "lock_reason")

    @property
    @pulumi.getter(name="logProjectId")
    def log_project_id(self) -> builtins.str:
        """
        流日志项目的ID。
        """
        return pulumi.get(self, "log_project_id")

    @property
    @pulumi.getter(name="logProjectName")
    def log_project_name(self) -> builtins.str:
        """
        流日志项目的名称。名称只能由小写字母、数字和连字符（-）组成。必须以小写字母或者数字开头和结尾。名称的长度范围为 3~63 个字符。
        """
        return pulumi.get(self, "log_project_name")

    @property
    @pulumi.getter(name="logTopicId")
    def log_topic_id(self) -> builtins.str:
        """
        流日志主题的ID。
        """
        return pulumi.get(self, "log_topic_id")

    @property
    @pulumi.getter(name="logTopicName")
    def log_topic_name(self) -> builtins.str:
        """
        流日志项目的名称。名称只能由小写字母、数字和连字符（-）组成。必须以小写字母或者数字开头和结尾。名称的长度范围为 3~63 个字符。
        """
        return pulumi.get(self, "log_topic_name")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        流流日志所属项目的名称。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="resourceId")
    def resource_id(self) -> builtins.str:
        """
        要捕获流量的资源ID。
        """
        return pulumi.get(self, "resource_id")

    @property
    @pulumi.getter(name="resourceType")
    def resource_type(self) -> builtins.str:
        """
        要采集流量的资源类型，取值如下：vpc：私有网络。subnet：子网。eni：网卡。
        """
        return pulumi.get(self, "resource_type")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        流日志的状态。取值如下：Active：启动状态。Pending：正在操作中。Inactive：未启动状态。Creating：正在创建中。Deleting：正在删除中。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetFlowLogTagResult']:
        """
        流日志的标签信息。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="trafficType")
    def traffic_type(self) -> builtins.str:
        """
        采集的流量类型。取值如下：All：全部流量。Allow：网络ACL和安全组允许的流量。Drop：网络ACL和安全组拒绝的流量。
        """
        return pulumi.get(self, "traffic_type")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> builtins.str:
        """
        更新流日志的时间。
        """
        return pulumi.get(self, "updated_at")

    @property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> builtins.str:
        """
        流日志的VPC的ID。
        """
        return pulumi.get(self, "vpc_id")


class AwaitableGetFlowLogResult(GetFlowLogResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetFlowLogResult(
            aggregation_interval=self.aggregation_interval,
            business_status=self.business_status,
            created_at=self.created_at,
            description=self.description,
            enable_index=self.enable_index,
            flow_log_id=self.flow_log_id,
            flow_log_name=self.flow_log_name,
            id=self.id,
            lock_reason=self.lock_reason,
            log_project_id=self.log_project_id,
            log_project_name=self.log_project_name,
            log_topic_id=self.log_topic_id,
            log_topic_name=self.log_topic_name,
            project_name=self.project_name,
            resource_id=self.resource_id,
            resource_type=self.resource_type,
            status=self.status,
            tags=self.tags,
            traffic_type=self.traffic_type,
            updated_at=self.updated_at,
            vpc_id=self.vpc_id)


def get_flow_log(id: Optional[builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFlowLogResult:
    """
    Data Source schema for Byteplus::VPC::FlowLog


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:vpc/getFlowLog:getFlowLog', __args__, opts=opts, typ=GetFlowLogResult).value

    return AwaitableGetFlowLogResult(
        aggregation_interval=pulumi.get(__ret__, 'aggregation_interval'),
        business_status=pulumi.get(__ret__, 'business_status'),
        created_at=pulumi.get(__ret__, 'created_at'),
        description=pulumi.get(__ret__, 'description'),
        enable_index=pulumi.get(__ret__, 'enable_index'),
        flow_log_id=pulumi.get(__ret__, 'flow_log_id'),
        flow_log_name=pulumi.get(__ret__, 'flow_log_name'),
        id=pulumi.get(__ret__, 'id'),
        lock_reason=pulumi.get(__ret__, 'lock_reason'),
        log_project_id=pulumi.get(__ret__, 'log_project_id'),
        log_project_name=pulumi.get(__ret__, 'log_project_name'),
        log_topic_id=pulumi.get(__ret__, 'log_topic_id'),
        log_topic_name=pulumi.get(__ret__, 'log_topic_name'),
        project_name=pulumi.get(__ret__, 'project_name'),
        resource_id=pulumi.get(__ret__, 'resource_id'),
        resource_type=pulumi.get(__ret__, 'resource_type'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        traffic_type=pulumi.get(__ret__, 'traffic_type'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'))
def get_flow_log_output(id: Optional[pulumi.Input[builtins.str]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetFlowLogResult]:
    """
    Data Source schema for Byteplus::VPC::FlowLog


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:vpc/getFlowLog:getFlowLog', __args__, opts=opts, typ=GetFlowLogResult)
    return __ret__.apply(lambda __response__: GetFlowLogResult(
        aggregation_interval=pulumi.get(__response__, 'aggregation_interval'),
        business_status=pulumi.get(__response__, 'business_status'),
        created_at=pulumi.get(__response__, 'created_at'),
        description=pulumi.get(__response__, 'description'),
        enable_index=pulumi.get(__response__, 'enable_index'),
        flow_log_id=pulumi.get(__response__, 'flow_log_id'),
        flow_log_name=pulumi.get(__response__, 'flow_log_name'),
        id=pulumi.get(__response__, 'id'),
        lock_reason=pulumi.get(__response__, 'lock_reason'),
        log_project_id=pulumi.get(__response__, 'log_project_id'),
        log_project_name=pulumi.get(__response__, 'log_project_name'),
        log_topic_id=pulumi.get(__response__, 'log_topic_id'),
        log_topic_name=pulumi.get(__response__, 'log_topic_name'),
        project_name=pulumi.get(__response__, 'project_name'),
        resource_id=pulumi.get(__response__, 'resource_id'),
        resource_type=pulumi.get(__response__, 'resource_type'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        traffic_type=pulumi.get(__response__, 'traffic_type'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        vpc_id=pulumi.get(__response__, 'vpc_id')))
