# 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__ = [
    'GetBandwidthPackageResult',
    'AwaitableGetBandwidthPackageResult',
    'get_bandwidth_package',
    'get_bandwidth_package_output',
]

@pulumi.output_type
class GetBandwidthPackageResult:
    """
    A collection of values returned by getBandwidthPackage.
    """
    def __init__(__self__, bandwidth=None, bandwidth_package_id=None, bandwidth_package_name=None, billing_type=None, business_status=None, created_time=None, deleted_time=None, description=None, eip_addresses=None, enable_dual_stack=None, expired_time=None, id=None, isp=None, overdue_time=None, period=None, period_unit=None, project_name=None, protocol=None, ratio=None, security_protection_types=None, status=None, tags=None, updated_time=None):
        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 bandwidth_package_name and not isinstance(bandwidth_package_name, str):
            raise TypeError("Expected argument 'bandwidth_package_name' to be a str")
        pulumi.set(__self__, "bandwidth_package_name", bandwidth_package_name)
        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 eip_addresses and not isinstance(eip_addresses, list):
            raise TypeError("Expected argument 'eip_addresses' to be a list")
        pulumi.set(__self__, "eip_addresses", eip_addresses)
        if enable_dual_stack and not isinstance(enable_dual_stack, bool):
            raise TypeError("Expected argument 'enable_dual_stack' to be a bool")
        pulumi.set(__self__, "enable_dual_stack", enable_dual_stack)
        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 isp and not isinstance(isp, str):
            raise TypeError("Expected argument 'isp' to be a str")
        pulumi.set(__self__, "isp", isp)
        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 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 protocol and not isinstance(protocol, str):
            raise TypeError("Expected argument 'protocol' to be a str")
        pulumi.set(__self__, "protocol", protocol)
        if ratio and not isinstance(ratio, int):
            raise TypeError("Expected argument 'ratio' to be a int")
        pulumi.set(__self__, "ratio", ratio)
        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 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
    def bandwidth(self) -> builtins.int:
        """
        共享带宽包的带宽上限，单位：Mbps。BillingType传入1：取值范围5 ~ 5000，BillingType传入2、3、4：取值范围2 ~ 5000。
        """
        return pulumi.get(self, "bandwidth")

    @property
    @pulumi.getter(name="bandwidthPackageId")
    def bandwidth_package_id(self) -> builtins.str:
        """
        带宽包ID
        """
        return pulumi.get(self, "bandwidth_package_id")

    @property
    @pulumi.getter(name="bandwidthPackageName")
    def bandwidth_package_name(self) -> builtins.str:
        """
        带宽包名称，长度限制为1 ~ 128个字符，需要以字母、中文或数字开头，可包含点号（.）、下划线（_）和短横线（-）。
        """
        return pulumi.get(self, "bandwidth_package_name")

    @property
    @pulumi.getter(name="billingType")
    def billing_type(self) -> builtins.int:
        """
        共享带宽包的计费方式。取值如下：1：包年包月。2 : 按带宽上限计费（默认值）。3：按主流量计费。4 : 按传统95计费（保底比例默认20%）。
        """
        return pulumi.get(self, "billing_type")

    @property
    @pulumi.getter(name="businessStatus")
    def business_status(self) -> builtins.str:
        """
        计费状态
        """
        return pulumi.get(self, "business_status")

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

    @property
    @pulumi.getter(name="deletedTime")
    def deleted_time(self) -> builtins.str:
        """
        删除时间
        """
        return pulumi.get(self, "deleted_time")

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

    @property
    @pulumi.getter(name="eipAddresses")
    def eip_addresses(self) -> Sequence['outputs.GetBandwidthPackageEipAddressResult']:
        """
        加入共享带宽包的公网IP信息列表。必须同时满足如下条件：1、二者线路类型相同。2、二者安全防护类型相同。3、二者地域相同。4、公网IP或IPv6公网带宽为按量计费。
        """
        return pulumi.get(self, "eip_addresses")

    @property
    @pulumi.getter(name="enableDualStack")
    def enable_dual_stack(self) -> builtins.bool:
        """
        是否启用双栈，取值如下：true：启用双栈。false：不启用双栈。
        """
        return pulumi.get(self, "enable_dual_stack")

    @property
    @pulumi.getter(name="expiredTime")
    def expired_time(self) -> builtins.str:
        """
        过期时间
        """
        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
    def isp(self) -> builtins.str:
        """
        线路类型，默认为BGP。BGP：BGP（多线）。1、若您的账号已申请并开通了静态单线权限，则可传入如下取值：1.1、ChinaMobile：中国移动静态单线。1.2、ChinaTelecom：中国电信静态单线。1.3、ChinaUnicom：中国联通静态单线。2、若您的账号已申请并开通了BGP单线权限，则可传入SingleLine*BGP。3、若您的账号已申请并开通了精品BGP权限，则可传入Premium*BGP。4、若您的账号已申请并开通了融合BGP权限，则可传入Fusion*BGP。5、若您的账号已申请并开通了惠选型静态单线权限，则可传入如下取值：5.1、ChinaMobile*Value：中国移动惠选型静态单线。5.2、ChinaUnicom*Value：中国联通惠选型静态单线。5.3、ChinaTelecom*Value：中国电信惠选型静态单线。
        """
        return pulumi.get(self, "isp")

    @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:
        """
        购买包年包月共享带宽包的时长，默认“1”。当PeriodUnit传入1，Period取值范围：1~9、12、24、36。当PeriodUnit传入2，Period取值范围：1～3。
        """
        return pulumi.get(self, "period")

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

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        项目名称，不填默认加入default项目。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter
    def protocol(self) -> builtins.str:
        """
        共享带宽包的IP协议，取值如下：Dual-stack：双栈协议类型。IPv4：IPv4协议类型协议。仅BillingType传2或4时，本参数支持传入Dual-stack
        """
        return pulumi.get(self, "protocol")

    @property
    @pulumi.getter
    def ratio(self) -> builtins.int:
        """
        95计费保底比例，单位%，仅95计费共享带宽包实例返回此参数。
        """
        return pulumi.get(self, "ratio")

    @property
    @pulumi.getter(name="securityProtectionTypes")
    def security_protection_types(self) -> Sequence[builtins.str]:
        """
        共享带宽包的的安全防护类型。AntiDDoS_Enhanced：创建增强防护类型的共享带宽包，即创建支持添加基础防护类型公网IP的共享带宽包。不填则表示基础防护类型的共享带宽包，即创建支持添加增强防护类型公网IP的共享带宽包。
        """
        return pulumi.get(self, "security_protection_types")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        共享带宽包的状态。Creating：创建中。Available：可用。Deleting：删除中。
        """
        return pulumi.get(self, "status")

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

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


class AwaitableGetBandwidthPackageResult(GetBandwidthPackageResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetBandwidthPackageResult(
            bandwidth=self.bandwidth,
            bandwidth_package_id=self.bandwidth_package_id,
            bandwidth_package_name=self.bandwidth_package_name,
            billing_type=self.billing_type,
            business_status=self.business_status,
            created_time=self.created_time,
            deleted_time=self.deleted_time,
            description=self.description,
            eip_addresses=self.eip_addresses,
            enable_dual_stack=self.enable_dual_stack,
            expired_time=self.expired_time,
            id=self.id,
            isp=self.isp,
            overdue_time=self.overdue_time,
            period=self.period,
            period_unit=self.period_unit,
            project_name=self.project_name,
            protocol=self.protocol,
            ratio=self.ratio,
            security_protection_types=self.security_protection_types,
            status=self.status,
            tags=self.tags,
            updated_time=self.updated_time)


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


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

    return AwaitableGetBandwidthPackageResult(
        bandwidth=pulumi.get(__ret__, 'bandwidth'),
        bandwidth_package_id=pulumi.get(__ret__, 'bandwidth_package_id'),
        bandwidth_package_name=pulumi.get(__ret__, 'bandwidth_package_name'),
        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'),
        eip_addresses=pulumi.get(__ret__, 'eip_addresses'),
        enable_dual_stack=pulumi.get(__ret__, 'enable_dual_stack'),
        expired_time=pulumi.get(__ret__, 'expired_time'),
        id=pulumi.get(__ret__, 'id'),
        isp=pulumi.get(__ret__, 'isp'),
        overdue_time=pulumi.get(__ret__, 'overdue_time'),
        period=pulumi.get(__ret__, 'period'),
        period_unit=pulumi.get(__ret__, 'period_unit'),
        project_name=pulumi.get(__ret__, 'project_name'),
        protocol=pulumi.get(__ret__, 'protocol'),
        ratio=pulumi.get(__ret__, 'ratio'),
        security_protection_types=pulumi.get(__ret__, 'security_protection_types'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        updated_time=pulumi.get(__ret__, 'updated_time'))
def get_bandwidth_package_output(id: Optional[pulumi.Input[builtins.str]] = None,
                                 opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetBandwidthPackageResult]:
    """
    Data Source schema for Byteplus::VPC::BandwidthPackage


    :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/getBandwidthPackage:getBandwidthPackage', __args__, opts=opts, typ=GetBandwidthPackageResult)
    return __ret__.apply(lambda __response__: GetBandwidthPackageResult(
        bandwidth=pulumi.get(__response__, 'bandwidth'),
        bandwidth_package_id=pulumi.get(__response__, 'bandwidth_package_id'),
        bandwidth_package_name=pulumi.get(__response__, 'bandwidth_package_name'),
        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'),
        eip_addresses=pulumi.get(__response__, 'eip_addresses'),
        enable_dual_stack=pulumi.get(__response__, 'enable_dual_stack'),
        expired_time=pulumi.get(__response__, 'expired_time'),
        id=pulumi.get(__response__, 'id'),
        isp=pulumi.get(__response__, 'isp'),
        overdue_time=pulumi.get(__response__, 'overdue_time'),
        period=pulumi.get(__response__, 'period'),
        period_unit=pulumi.get(__response__, 'period_unit'),
        project_name=pulumi.get(__response__, 'project_name'),
        protocol=pulumi.get(__response__, 'protocol'),
        ratio=pulumi.get(__response__, 'ratio'),
        security_protection_types=pulumi.get(__response__, 'security_protection_types'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        updated_time=pulumi.get(__response__, 'updated_time')))
