# 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__ = [
    'GetEniResult',
    'AwaitableGetEniResult',
    'get_eni',
    'get_eni_output',
]

@pulumi.output_type
class GetEniResult:
    """
    A collection of values returned by getEni.
    """
    def __init__(__self__, account_id=None, created_time=None, delete_on_termination=None, description=None, id=None, instance_id=None, ipv6_address_count=None, ipv6_sets=None, mac_address=None, network_interface_id=None, network_interface_name=None, port_security_enabled=None, primary_ip_address=None, private_ip_sets=None, project_name=None, secondary_private_ip_address_count=None, security_group_ids=None, service_managed=None, status=None, subnet_id=None, tags=None, type=None, updated_time=None, vpc_id=None, vpc_name=None, zone_id=None):
        if account_id and not isinstance(account_id, str):
            raise TypeError("Expected argument 'account_id' to be a str")
        pulumi.set(__self__, "account_id", account_id)
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if delete_on_termination and not isinstance(delete_on_termination, bool):
            raise TypeError("Expected argument 'delete_on_termination' to be a bool")
        pulumi.set(__self__, "delete_on_termination", delete_on_termination)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if instance_id and not isinstance(instance_id, str):
            raise TypeError("Expected argument 'instance_id' to be a str")
        pulumi.set(__self__, "instance_id", instance_id)
        if ipv6_address_count and not isinstance(ipv6_address_count, int):
            raise TypeError("Expected argument 'ipv6_address_count' to be a int")
        pulumi.set(__self__, "ipv6_address_count", ipv6_address_count)
        if ipv6_sets and not isinstance(ipv6_sets, list):
            raise TypeError("Expected argument 'ipv6_sets' to be a list")
        pulumi.set(__self__, "ipv6_sets", ipv6_sets)
        if mac_address and not isinstance(mac_address, str):
            raise TypeError("Expected argument 'mac_address' to be a str")
        pulumi.set(__self__, "mac_address", mac_address)
        if network_interface_id and not isinstance(network_interface_id, str):
            raise TypeError("Expected argument 'network_interface_id' to be a str")
        pulumi.set(__self__, "network_interface_id", network_interface_id)
        if network_interface_name and not isinstance(network_interface_name, str):
            raise TypeError("Expected argument 'network_interface_name' to be a str")
        pulumi.set(__self__, "network_interface_name", network_interface_name)
        if port_security_enabled and not isinstance(port_security_enabled, bool):
            raise TypeError("Expected argument 'port_security_enabled' to be a bool")
        pulumi.set(__self__, "port_security_enabled", port_security_enabled)
        if primary_ip_address and not isinstance(primary_ip_address, dict):
            raise TypeError("Expected argument 'primary_ip_address' to be a dict")
        pulumi.set(__self__, "primary_ip_address", primary_ip_address)
        if private_ip_sets and not isinstance(private_ip_sets, list):
            raise TypeError("Expected argument 'private_ip_sets' to be a list")
        pulumi.set(__self__, "private_ip_sets", private_ip_sets)
        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 secondary_private_ip_address_count and not isinstance(secondary_private_ip_address_count, int):
            raise TypeError("Expected argument 'secondary_private_ip_address_count' to be a int")
        pulumi.set(__self__, "secondary_private_ip_address_count", secondary_private_ip_address_count)
        if security_group_ids and not isinstance(security_group_ids, list):
            raise TypeError("Expected argument 'security_group_ids' to be a list")
        pulumi.set(__self__, "security_group_ids", security_group_ids)
        if service_managed and not isinstance(service_managed, bool):
            raise TypeError("Expected argument 'service_managed' to be a bool")
        pulumi.set(__self__, "service_managed", service_managed)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if subnet_id and not isinstance(subnet_id, str):
            raise TypeError("Expected argument 'subnet_id' to be a str")
        pulumi.set(__self__, "subnet_id", subnet_id)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)
        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)
        if vpc_name and not isinstance(vpc_name, str):
            raise TypeError("Expected argument 'vpc_name' to be a str")
        pulumi.set(__self__, "vpc_name", vpc_name)
        if zone_id and not isinstance(zone_id, str):
            raise TypeError("Expected argument 'zone_id' to be a str")
        pulumi.set(__self__, "zone_id", zone_id)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> builtins.str:
        """
        网卡所有者ID。
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        网卡创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter(name="deleteOnTermination")
    def delete_on_termination(self) -> builtins.bool:
        """
        是否开启随云服务器实例删除，true为开启，false为不开启。
        """
        return pulumi.get(self, "delete_on_termination")

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

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

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> builtins.str:
        """
        网卡绑定实例的ID，如果网卡未挂载或参数ServiceManaged为true，则InstanceId返回值均为空。
        """
        return pulumi.get(self, "instance_id")

    @property
    @pulumi.getter(name="ipv6AddressCount")
    def ipv6_address_count(self) -> builtins.int:
        """
        为网卡分配私网IPv6地址的数量，传入该参数，系统会自动从网卡所属子网中，分配相应数量的空闲私网IPv6地址，创建时与IPv6Sets不能同时传入。
        """
        return pulumi.get(self, "ipv6_address_count")

    @property
    @pulumi.getter(name="ipv6Sets")
    def ipv6_sets(self) -> Sequence[builtins.str]:
        """
        网卡的IPv6地址列表，例如[2408::153:3921:XX:XX:7b12:1c5f, 2408:4008:2cf:XX:XX:dd1e:2a22:5ddf]。
        """
        return pulumi.get(self, "ipv6_sets")

    @property
    @pulumi.getter(name="macAddress")
    def mac_address(self) -> builtins.str:
        """
        网卡的MAC地址。
        """
        return pulumi.get(self, "mac_address")

    @property
    @pulumi.getter(name="networkInterfaceId")
    def network_interface_id(self) -> builtins.str:
        """
        网卡ID。
        """
        return pulumi.get(self, "network_interface_id")

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

    @property
    @pulumi.getter(name="portSecurityEnabled")
    def port_security_enabled(self) -> builtins.bool:
        """
        是否为网卡开启源/目的地址检查，开启后，系统会自动阻止源地址或目的地址不是当前网卡的流量，true为开启，false为不开启（默认值）。
        """
        return pulumi.get(self, "port_security_enabled")

    @property
    @pulumi.getter(name="primaryIpAddress")
    def primary_ip_address(self) -> 'outputs.GetEniPrimaryIpAddressResult':
        """
        网卡的主私有IPv4地址，不支持修改地址，可以修改公网IP。如果指定，必须是对应子网中的一个空闲的私网IPv4地址，如果不指定，从对应子网中自动分配一个空闲的私网IPv4地址。例如：192.XX.XX.10。
        """
        return pulumi.get(self, "primary_ip_address")

    @property
    @pulumi.getter(name="privateIpSets")
    def private_ip_sets(self) -> Sequence['outputs.GetEniPrivateIpSetResult']:
        """
        网卡的私网IPv4地址列表。
        """
        return pulumi.get(self, "private_ip_sets")

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

    @property
    @pulumi.getter(name="secondaryPrivateIpAddressCount")
    def secondary_private_ip_address_count(self) -> builtins.int:
        """
        为辅助网卡自动分配辅助私网IPv4地址数量，取值1~49。创建时不能与PrivateIpSets同时传入。
        """
        return pulumi.get(self, "secondary_private_ip_address_count")

    @property
    @pulumi.getter(name="securityGroupIds")
    def security_group_ids(self) -> Sequence[builtins.str]:
        """
        辅助网卡加入一个或多个安全组的ID。
        """
        return pulumi.get(self, "security_group_ids")

    @property
    @pulumi.getter(name="serviceManaged")
    def service_managed(self) -> builtins.bool:
        """
        是否为官方服务网卡，true为是，false为否。
        """
        return pulumi.get(self, "service_managed")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        网卡的绑定状态。Creating：创建中。Available：未挂载。Attaching：挂载中。InUse：已挂载。Detaching：卸载中。Deleting：删除中。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="subnetId")
    def subnet_id(self) -> builtins.str:
        """
        辅助网卡所在子网的ID。
        """
        return pulumi.get(self, "subnet_id")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetEniTagResult']:
        """
        标签。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def type(self) -> builtins.str:
        """
        网卡类型。primary：主网卡，secondary：辅助网卡
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.str:
        """
        更新网卡的时间。
        """
        return pulumi.get(self, "updated_time")

    @property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> builtins.str:
        """
        网卡所属的VPC的ID。
        """
        return pulumi.get(self, "vpc_id")

    @property
    @pulumi.getter(name="vpcName")
    def vpc_name(self) -> builtins.str:
        """
        网卡所属VPC的名称。
        """
        return pulumi.get(self, "vpc_name")

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> builtins.str:
        """
        网卡所属可用区的ID。
        """
        return pulumi.get(self, "zone_id")


class AwaitableGetEniResult(GetEniResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetEniResult(
            account_id=self.account_id,
            created_time=self.created_time,
            delete_on_termination=self.delete_on_termination,
            description=self.description,
            id=self.id,
            instance_id=self.instance_id,
            ipv6_address_count=self.ipv6_address_count,
            ipv6_sets=self.ipv6_sets,
            mac_address=self.mac_address,
            network_interface_id=self.network_interface_id,
            network_interface_name=self.network_interface_name,
            port_security_enabled=self.port_security_enabled,
            primary_ip_address=self.primary_ip_address,
            private_ip_sets=self.private_ip_sets,
            project_name=self.project_name,
            secondary_private_ip_address_count=self.secondary_private_ip_address_count,
            security_group_ids=self.security_group_ids,
            service_managed=self.service_managed,
            status=self.status,
            subnet_id=self.subnet_id,
            tags=self.tags,
            type=self.type,
            updated_time=self.updated_time,
            vpc_id=self.vpc_id,
            vpc_name=self.vpc_name,
            zone_id=self.zone_id)


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


    :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/getEni:getEni', __args__, opts=opts, typ=GetEniResult).value

    return AwaitableGetEniResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        created_time=pulumi.get(__ret__, 'created_time'),
        delete_on_termination=pulumi.get(__ret__, 'delete_on_termination'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        instance_id=pulumi.get(__ret__, 'instance_id'),
        ipv6_address_count=pulumi.get(__ret__, 'ipv6_address_count'),
        ipv6_sets=pulumi.get(__ret__, 'ipv6_sets'),
        mac_address=pulumi.get(__ret__, 'mac_address'),
        network_interface_id=pulumi.get(__ret__, 'network_interface_id'),
        network_interface_name=pulumi.get(__ret__, 'network_interface_name'),
        port_security_enabled=pulumi.get(__ret__, 'port_security_enabled'),
        primary_ip_address=pulumi.get(__ret__, 'primary_ip_address'),
        private_ip_sets=pulumi.get(__ret__, 'private_ip_sets'),
        project_name=pulumi.get(__ret__, 'project_name'),
        secondary_private_ip_address_count=pulumi.get(__ret__, 'secondary_private_ip_address_count'),
        security_group_ids=pulumi.get(__ret__, 'security_group_ids'),
        service_managed=pulumi.get(__ret__, 'service_managed'),
        status=pulumi.get(__ret__, 'status'),
        subnet_id=pulumi.get(__ret__, 'subnet_id'),
        tags=pulumi.get(__ret__, 'tags'),
        type=pulumi.get(__ret__, 'type'),
        updated_time=pulumi.get(__ret__, 'updated_time'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'),
        vpc_name=pulumi.get(__ret__, 'vpc_name'),
        zone_id=pulumi.get(__ret__, 'zone_id'))
def get_eni_output(id: Optional[pulumi.Input[builtins.str]] = None,
                   opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetEniResult]:
    """
    Data Source schema for Byteplus::VPC::ENI


    :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/getEni:getEni', __args__, opts=opts, typ=GetEniResult)
    return __ret__.apply(lambda __response__: GetEniResult(
        account_id=pulumi.get(__response__, 'account_id'),
        created_time=pulumi.get(__response__, 'created_time'),
        delete_on_termination=pulumi.get(__response__, 'delete_on_termination'),
        description=pulumi.get(__response__, 'description'),
        id=pulumi.get(__response__, 'id'),
        instance_id=pulumi.get(__response__, 'instance_id'),
        ipv6_address_count=pulumi.get(__response__, 'ipv6_address_count'),
        ipv6_sets=pulumi.get(__response__, 'ipv6_sets'),
        mac_address=pulumi.get(__response__, 'mac_address'),
        network_interface_id=pulumi.get(__response__, 'network_interface_id'),
        network_interface_name=pulumi.get(__response__, 'network_interface_name'),
        port_security_enabled=pulumi.get(__response__, 'port_security_enabled'),
        primary_ip_address=pulumi.get(__response__, 'primary_ip_address'),
        private_ip_sets=pulumi.get(__response__, 'private_ip_sets'),
        project_name=pulumi.get(__response__, 'project_name'),
        secondary_private_ip_address_count=pulumi.get(__response__, 'secondary_private_ip_address_count'),
        security_group_ids=pulumi.get(__response__, 'security_group_ids'),
        service_managed=pulumi.get(__response__, 'service_managed'),
        status=pulumi.get(__response__, 'status'),
        subnet_id=pulumi.get(__response__, 'subnet_id'),
        tags=pulumi.get(__response__, 'tags'),
        type=pulumi.get(__response__, 'type'),
        updated_time=pulumi.get(__response__, 'updated_time'),
        vpc_id=pulumi.get(__response__, 'vpc_id'),
        vpc_name=pulumi.get(__response__, 'vpc_name'),
        zone_id=pulumi.get(__response__, 'zone_id')))
