# 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__ = [
    'GetEipResult',
    'AwaitableGetEipResult',
    'get_eip',
    'get_eip_output',
]

@pulumi.output_type
class GetEipResult:
    """
    A collection of values returned by getEip.
    """
    def __init__(__self__, allocation_id=None, bandwidth=None, bandwidth_package_id=None, billing_type=None, business_status=None, created_time=None, deleted_time=None, description=None, direct_mode=None, eip_address=None, expired_time=None, id=None, instance_id=None, instance_type=None, ip_address=None, ip_address_pool_id=None, is_blocked=None, isp=None, lock_reason=None, name=None, overdue_time=None, period=None, period_unit=None, private_ip_address=None, project_name=None, release_with_instance=None, renew_period_times=None, renew_type=None, security_protection_instance_id=None, security_protection_types=None, service_managed=None, status=None, tags=None, updated_time=None):
        if allocation_id and not isinstance(allocation_id, str):
            raise TypeError("Expected argument 'allocation_id' to be a str")
        pulumi.set(__self__, "allocation_id", allocation_id)
        if bandwidth and not isinstance(bandwidth, int):
            raise TypeError("Expected argument 'bandwidth' to be a int")
        pulumi.set(__self__, "bandwidth", bandwidth)
        if bandwidth_package_id and not isinstance(bandwidth_package_id, str):
            raise TypeError("Expected argument 'bandwidth_package_id' to be a str")
        pulumi.set(__self__, "bandwidth_package_id", bandwidth_package_id)
        if billing_type and not isinstance(billing_type, int):
            raise TypeError("Expected argument 'billing_type' to be a int")
        pulumi.set(__self__, "billing_type", billing_type)
        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_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 deleted_time and not isinstance(deleted_time, str):
            raise TypeError("Expected argument 'deleted_time' to be a str")
        pulumi.set(__self__, "deleted_time", deleted_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if direct_mode and not isinstance(direct_mode, bool):
            raise TypeError("Expected argument 'direct_mode' to be a bool")
        pulumi.set(__self__, "direct_mode", direct_mode)
        if eip_address and not isinstance(eip_address, str):
            raise TypeError("Expected argument 'eip_address' to be a str")
        pulumi.set(__self__, "eip_address", eip_address)
        if expired_time and not isinstance(expired_time, str):
            raise TypeError("Expected argument 'expired_time' to be a str")
        pulumi.set(__self__, "expired_time", expired_time)
        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 instance_type and not isinstance(instance_type, str):
            raise TypeError("Expected argument 'instance_type' to be a str")
        pulumi.set(__self__, "instance_type", instance_type)
        if ip_address and not isinstance(ip_address, str):
            raise TypeError("Expected argument 'ip_address' to be a str")
        pulumi.set(__self__, "ip_address", ip_address)
        if ip_address_pool_id and not isinstance(ip_address_pool_id, str):
            raise TypeError("Expected argument 'ip_address_pool_id' to be a str")
        pulumi.set(__self__, "ip_address_pool_id", ip_address_pool_id)
        if is_blocked and not isinstance(is_blocked, bool):
            raise TypeError("Expected argument 'is_blocked' to be a bool")
        pulumi.set(__self__, "is_blocked", is_blocked)
        if isp and not isinstance(isp, str):
            raise TypeError("Expected argument 'isp' to be a str")
        pulumi.set(__self__, "isp", isp)
        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 name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if overdue_time and not isinstance(overdue_time, str):
            raise TypeError("Expected argument 'overdue_time' to be a str")
        pulumi.set(__self__, "overdue_time", overdue_time)
        if period and not isinstance(period, int):
            raise TypeError("Expected argument 'period' to be a int")
        pulumi.set(__self__, "period", period)
        if period_unit and not isinstance(period_unit, int):
            raise TypeError("Expected argument 'period_unit' to be a int")
        pulumi.set(__self__, "period_unit", period_unit)
        if private_ip_address and not isinstance(private_ip_address, str):
            raise TypeError("Expected argument 'private_ip_address' to be a str")
        pulumi.set(__self__, "private_ip_address", private_ip_address)
        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 release_with_instance and not isinstance(release_with_instance, bool):
            raise TypeError("Expected argument 'release_with_instance' to be a bool")
        pulumi.set(__self__, "release_with_instance", release_with_instance)
        if renew_period_times and not isinstance(renew_period_times, int):
            raise TypeError("Expected argument 'renew_period_times' to be a int")
        pulumi.set(__self__, "renew_period_times", renew_period_times)
        if renew_type and not isinstance(renew_type, int):
            raise TypeError("Expected argument 'renew_type' to be a int")
        pulumi.set(__self__, "renew_type", renew_type)
        if security_protection_instance_id and not isinstance(security_protection_instance_id, int):
            raise TypeError("Expected argument 'security_protection_instance_id' to be a int")
        pulumi.set(__self__, "security_protection_instance_id", security_protection_instance_id)
        if security_protection_types and not isinstance(security_protection_types, list):
            raise TypeError("Expected argument 'security_protection_types' to be a list")
        pulumi.set(__self__, "security_protection_types", security_protection_types)
        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 tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        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)

    @property
    @pulumi.getter(name="allocationId")
    def allocation_id(self) -> builtins.str:
        """
        公网IP的ID。
        """
        return pulumi.get(self, "allocation_id")

    @property
    @pulumi.getter
    def bandwidth(self) -> builtins.int:
        """
        公网IP的带宽上限，默认为“1”，单位：Mbps,BillingType传入1：取值范围1 ~ 500。BillingType传入2：取值范围1 ~ 500。BillingType传入3：取值范围1 ~ 200。
        """
        return pulumi.get(self, "bandwidth")

    @property
    @pulumi.getter(name="bandwidthPackageId")
    def bandwidth_package_id(self) -> builtins.str:
        """
        共享带宽包的ID，表示将公网IP加入到共享带宽包。公网IP加入到共享带宽包必须同时满足如下条件：二者的安全防护类型相同。二者的地域相同。公网IP的计费方式必须是按量计费。共享带宽包为IPv4类型。
        """
        return pulumi.get(self, "bandwidth_package_id")

    @property
    @pulumi.getter(name="billingType")
    def billing_type(self) -> builtins.int:
        """
        公网IP的计费方式。取值如下：1：包年包月。2：按量计费-按带宽上限计费。3：按量计费-按实际流量计费。
        """
        return pulumi.get(self, "billing_type")

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

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

    @property
    @pulumi.getter(name="deletedTime")
    def deleted_time(self) -> builtins.str:
        """
        预期资源强制回收时间。包年包月公网IP，此参数有返回值。按量计费公网IP，仅欠费冻结时，此参数有返回值。
        """
        return pulumi.get(self, "deleted_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        公网IP的描述信息。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="directMode")
    def direct_mode(self) -> builtins.bool:
        """
        绑定公网IP时是否启用直通模式。请严格按照以下枚举值的大小写输入，不要传入其他取值。false（默认）：不使用直通模式。true：使用直通模式。
        """
        return pulumi.get(self, "direct_mode")

    @property
    @pulumi.getter(name="eipAddress")
    def eip_address(self) -> builtins.str:
        """
        公网IP地址。
        """
        return pulumi.get(self, "eip_address")

    @property
    @pulumi.getter(name="expiredTime")
    def expired_time(self) -> builtins.str:
        """
        公网IP的到期时间。包年包月，返回值为到期时间。按量计费，返回值为空。
        """
        return pulumi.get(self, "expired_time")

    @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。
        """
        return pulumi.get(self, "instance_id")

    @property
    @pulumi.getter(name="instanceType")
    def instance_type(self) -> builtins.str:
        """
        当前绑定的实例类型。Nat：公网NAT网关。NetworkInterface: 弹性网卡。ClbInstance: 负载均衡。EcsInstance：云服务器。HaVip：高可用虚拟IP。
        """
        return pulumi.get(self, "instance_type")

    @property
    @pulumi.getter(name="ipAddress")
    def ip_address(self) -> builtins.str:
        """
        申请申请指定的公网IP地址。仅支持填写使用后释放的IP地址，不填则表示自动分配。指定的公网IP地址
        """
        return pulumi.get(self, "ip_address")

    @property
    @pulumi.getter(name="ipAddressPoolId")
    def ip_address_pool_id(self) -> builtins.str:
        """
        IP地址池的ID。
        """
        return pulumi.get(self, "ip_address_pool_id")

    @property
    @pulumi.getter(name="isBlocked")
    def is_blocked(self) -> builtins.bool:
        """
        是否被封禁。true：是。false：否。
        """
        return pulumi.get(self, "is_blocked")

    @property
    @pulumi.getter
    def isp(self) -> builtins.str:
        """
        线路类型。BGP：BGP（多线）。ChinaMobile：中国移动静态单线。ChinaTelecom：中国电信静态单线。ChinaUnicom：中国联通静态单线。SingleLine*BGP：BGP单线。Fusion*BGP：融合BGP。ChinaMobile*Value：中国移动惠选型静态单线。ChinaUnicom*Value：中国联通惠选型静态单线。ChinaTelecom_Value：中国电信惠选型静态单线。
        """
        return pulumi.get(self, "isp")

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

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        公网IP的名称。
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="overdueTime")
    def overdue_time(self) -> builtins.str:
        """
        资源冻结时间。仅当资源因为欠费冻结，此参数才会有返回值。
        """
        return pulumi.get(self, "overdue_time")

    @property
    @pulumi.getter
    def period(self) -> builtins.int:
        """
        代表购买包年包月公网IP的时长时，默认为“1”。当PeriodUnit传入1，Period取值范围：1~9、12、24、36、48、60。当PeriodUnit传入2，Period取值范围：1～5。代表临时升配的时长时：单位为小时，取值范围：1～720。
        """
        return pulumi.get(self, "period")

    @property
    @pulumi.getter(name="periodUnit")
    def period_unit(self) -> builtins.int:
        """
        购买包年包月公网IP时长的单位。取值如下：1（默认值）：月。2 ：年。
        """
        return pulumi.get(self, "period_unit")

    @property
    @pulumi.getter(name="privateIpAddress")
    def private_ip_address(self) -> builtins.str:
        """
        要绑定公网IP的实例的私网IP地址。只支持传入云服务ECS主网卡的私网IP地址和辅助网卡IP地址。若不填写：InstanceType传入EcsInstance，则绑定云服务器ECS主网卡的主私网IP地址。InstanceType传入NetworkInterface，则绑定辅助网卡主私网IP地址。
        """
        return pulumi.get(self, "private_ip_address")

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

    @property
    @pulumi.getter(name="releaseWithInstance")
    def release_with_instance(self) -> builtins.bool:
        """
        是否随云服务器实例删除。仅按量计费公网IP有效。开启后，当云服务器实例被系统自动回收（退订24小时后、到期回收、欠费回收）或被调用DeleteInstances接口时，公网IP随其一同释放。true：是。false：否。
        """
        return pulumi.get(self, "release_with_instance")

    @property
    @pulumi.getter(name="renewPeriodTimes")
    def renew_period_times(self) -> builtins.int:
        """
        自动续费的时长，取值范围1、2、3、6、12，单位：月。若RenewType传入2，则必须传入RenewPeriodTimes
        """
        return pulumi.get(self, "renew_period_times")

    @property
    @pulumi.getter(name="renewType")
    def renew_type(self) -> builtins.int:
        """
        包年包月公网IP续费的方式。取值如下：1（默认值）：手动续费。2：自动续费。3：到期不续费。
        """
        return pulumi.get(self, "renew_type")

    @property
    @pulumi.getter(name="securityProtectionInstanceId")
    def security_protection_instance_id(self) -> builtins.int:
        """
        DDoS原生防护（企业版）ID。您可以调用 DescInstanceList 接口，查询DDoS原生防护（企业版）的ID。当SecurityProtectionTypes传入AntiDDoS_Enhanced时，此参数必须传入。
        """
        return pulumi.get(self, "security_protection_instance_id")

    @property
    @pulumi.getter(name="securityProtectionTypes")
    def security_protection_types(self) -> Sequence[builtins.str]:
        """
        防护类型。AntiDDoS_Enhanced：增强防护类型的公网IP，可以加入到DDoS原生防护（企业版）实例。空值：默认防护类型的公网IP。
        """
        return pulumi.get(self, "security_protection_types")

    @property
    @pulumi.getter(name="serviceManaged")
    def service_managed(self) -> builtins.bool:
        """
        是否由服务管理
        """
        return pulumi.get(self, "service_managed")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        公网IP的状态。Attaching：绑定中。Detaching：解绑中。Attached：已绑定。Available：可用。Deleting：删除中。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetEipTagResult']:
        """
        公网IP的标签信息
        """
        return pulumi.get(self, "tags")

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


class AwaitableGetEipResult(GetEipResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetEipResult(
            allocation_id=self.allocation_id,
            bandwidth=self.bandwidth,
            bandwidth_package_id=self.bandwidth_package_id,
            billing_type=self.billing_type,
            business_status=self.business_status,
            created_time=self.created_time,
            deleted_time=self.deleted_time,
            description=self.description,
            direct_mode=self.direct_mode,
            eip_address=self.eip_address,
            expired_time=self.expired_time,
            id=self.id,
            instance_id=self.instance_id,
            instance_type=self.instance_type,
            ip_address=self.ip_address,
            ip_address_pool_id=self.ip_address_pool_id,
            is_blocked=self.is_blocked,
            isp=self.isp,
            lock_reason=self.lock_reason,
            name=self.name,
            overdue_time=self.overdue_time,
            period=self.period,
            period_unit=self.period_unit,
            private_ip_address=self.private_ip_address,
            project_name=self.project_name,
            release_with_instance=self.release_with_instance,
            renew_period_times=self.renew_period_times,
            renew_type=self.renew_type,
            security_protection_instance_id=self.security_protection_instance_id,
            security_protection_types=self.security_protection_types,
            service_managed=self.service_managed,
            status=self.status,
            tags=self.tags,
            updated_time=self.updated_time)


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


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

    return AwaitableGetEipResult(
        allocation_id=pulumi.get(__ret__, 'allocation_id'),
        bandwidth=pulumi.get(__ret__, 'bandwidth'),
        bandwidth_package_id=pulumi.get(__ret__, 'bandwidth_package_id'),
        billing_type=pulumi.get(__ret__, 'billing_type'),
        business_status=pulumi.get(__ret__, 'business_status'),
        created_time=pulumi.get(__ret__, 'created_time'),
        deleted_time=pulumi.get(__ret__, 'deleted_time'),
        description=pulumi.get(__ret__, 'description'),
        direct_mode=pulumi.get(__ret__, 'direct_mode'),
        eip_address=pulumi.get(__ret__, 'eip_address'),
        expired_time=pulumi.get(__ret__, 'expired_time'),
        id=pulumi.get(__ret__, 'id'),
        instance_id=pulumi.get(__ret__, 'instance_id'),
        instance_type=pulumi.get(__ret__, 'instance_type'),
        ip_address=pulumi.get(__ret__, 'ip_address'),
        ip_address_pool_id=pulumi.get(__ret__, 'ip_address_pool_id'),
        is_blocked=pulumi.get(__ret__, 'is_blocked'),
        isp=pulumi.get(__ret__, 'isp'),
        lock_reason=pulumi.get(__ret__, 'lock_reason'),
        name=pulumi.get(__ret__, 'name'),
        overdue_time=pulumi.get(__ret__, 'overdue_time'),
        period=pulumi.get(__ret__, 'period'),
        period_unit=pulumi.get(__ret__, 'period_unit'),
        private_ip_address=pulumi.get(__ret__, 'private_ip_address'),
        project_name=pulumi.get(__ret__, 'project_name'),
        release_with_instance=pulumi.get(__ret__, 'release_with_instance'),
        renew_period_times=pulumi.get(__ret__, 'renew_period_times'),
        renew_type=pulumi.get(__ret__, 'renew_type'),
        security_protection_instance_id=pulumi.get(__ret__, 'security_protection_instance_id'),
        security_protection_types=pulumi.get(__ret__, 'security_protection_types'),
        service_managed=pulumi.get(__ret__, 'service_managed'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        updated_time=pulumi.get(__ret__, 'updated_time'))
def get_eip_output(id: Optional[pulumi.Input[builtins.str]] = None,
                   opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetEipResult]:
    """
    Data Source schema for Byteplus::VPC::EIP


    :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/getEip:getEip', __args__, opts=opts, typ=GetEipResult)
    return __ret__.apply(lambda __response__: GetEipResult(
        allocation_id=pulumi.get(__response__, 'allocation_id'),
        bandwidth=pulumi.get(__response__, 'bandwidth'),
        bandwidth_package_id=pulumi.get(__response__, 'bandwidth_package_id'),
        billing_type=pulumi.get(__response__, 'billing_type'),
        business_status=pulumi.get(__response__, 'business_status'),
        created_time=pulumi.get(__response__, 'created_time'),
        deleted_time=pulumi.get(__response__, 'deleted_time'),
        description=pulumi.get(__response__, 'description'),
        direct_mode=pulumi.get(__response__, 'direct_mode'),
        eip_address=pulumi.get(__response__, 'eip_address'),
        expired_time=pulumi.get(__response__, 'expired_time'),
        id=pulumi.get(__response__, 'id'),
        instance_id=pulumi.get(__response__, 'instance_id'),
        instance_type=pulumi.get(__response__, 'instance_type'),
        ip_address=pulumi.get(__response__, 'ip_address'),
        ip_address_pool_id=pulumi.get(__response__, 'ip_address_pool_id'),
        is_blocked=pulumi.get(__response__, 'is_blocked'),
        isp=pulumi.get(__response__, 'isp'),
        lock_reason=pulumi.get(__response__, 'lock_reason'),
        name=pulumi.get(__response__, 'name'),
        overdue_time=pulumi.get(__response__, 'overdue_time'),
        period=pulumi.get(__response__, 'period'),
        period_unit=pulumi.get(__response__, 'period_unit'),
        private_ip_address=pulumi.get(__response__, 'private_ip_address'),
        project_name=pulumi.get(__response__, 'project_name'),
        release_with_instance=pulumi.get(__response__, 'release_with_instance'),
        renew_period_times=pulumi.get(__response__, 'renew_period_times'),
        renew_type=pulumi.get(__response__, 'renew_type'),
        security_protection_instance_id=pulumi.get(__response__, 'security_protection_instance_id'),
        security_protection_types=pulumi.get(__response__, 'security_protection_types'),
        service_managed=pulumi.get(__response__, 'service_managed'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        updated_time=pulumi.get(__response__, 'updated_time')))
