# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables

__all__ = ['BandwidthPackage']


class BandwidthPackage(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 auto_pay: Optional[pulumi.Input[bool]] = None,
                 auto_use_coupon: Optional[pulumi.Input[bool]] = None,
                 bandwidth: Optional[pulumi.Input[int]] = None,
                 bandwidth_package_name: Optional[pulumi.Input[str]] = None,
                 bandwidth_type: Optional[pulumi.Input[str]] = None,
                 billing_type: Optional[pulumi.Input[str]] = None,
                 cbn_geographic_region_ida: Optional[pulumi.Input[str]] = None,
                 cbn_geographic_region_idb: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 duration: Optional[pulumi.Input[str]] = None,
                 payment_type: Optional[pulumi.Input[str]] = None,
                 ratio: Optional[pulumi.Input[int]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Provides a Global Accelerator (GA) Bandwidth Package resource.

        For information about Global Accelerator (GA) Bandwidth Package and how to use it, see [What is Bandwidth Package](https://www.alibabacloud.com/help/en/doc-detail/153241.htm).

        > **NOTE:** Available in v1.112.0+.

        ## Example Usage

        Basic Usage

        ```python
        import pulumi
        import pulumi_alicloud as alicloud

        example = alicloud.ga.BandwidthPackage("example",
            auto_pay=True,
            bandwidth=20,
            bandwidth_type="Basic",
            duration="1",
            ratio=30,
            type="Basic")
        ```

        ## Import

        Ga Bandwidth Package can be imported using the id, e.g.

        ```sh
         $ pulumi import alicloud:ga/bandwidthPackage:BandwidthPackage example <id>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[bool] auto_pay: The auto pay. Valid values: `false`, `true`.
        :param pulumi.Input[bool] auto_use_coupon: The auto use coupon. Valid values: `false`, `true`.
        :param pulumi.Input[int] bandwidth: The bandwidth value of bandwidth packet.
        :param pulumi.Input[str] bandwidth_package_name: The name of the bandwidth packet.
        :param pulumi.Input[str] bandwidth_type: The bandwidth type of the bandwidth. Valid values: `Advanced`, `Basic`, `Enhanced`.
        :param pulumi.Input[str] billing_type: The billing type. Valid values: `PayBy95`, `PayByTraffic`.
        :param pulumi.Input[str] cbn_geographic_region_ida: Interworking area A of cross domain acceleration package. Only international stations support returning this parameter. Default value is `China-mainland`.
        :param pulumi.Input[str] cbn_geographic_region_idb: Interworking area B of cross domain acceleration package. Only international stations support returning this parameter. Default value is `Global`.
        :param pulumi.Input[str] description: The description of bandwidth package.
        :param pulumi.Input[str] duration: The duration.
        :param pulumi.Input[str] payment_type: The payment type of the bandwidth. Valid values: `PayAsYouGo`, `Subscription`. Default value is `Subscription`.
        :param pulumi.Input[int] ratio: The ratio.
        :param pulumi.Input[str] type: The type of the bandwidth packet. China station only supports return to basic. Valid values: `Basic`, `CrossDomain`.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = dict()

            __props__['auto_pay'] = auto_pay
            __props__['auto_use_coupon'] = auto_use_coupon
            if bandwidth is None and not opts.urn:
                raise TypeError("Missing required property 'bandwidth'")
            __props__['bandwidth'] = bandwidth
            __props__['bandwidth_package_name'] = bandwidth_package_name
            __props__['bandwidth_type'] = bandwidth_type
            __props__['billing_type'] = billing_type
            __props__['cbn_geographic_region_ida'] = cbn_geographic_region_ida
            __props__['cbn_geographic_region_idb'] = cbn_geographic_region_idb
            __props__['description'] = description
            __props__['duration'] = duration
            __props__['payment_type'] = payment_type
            __props__['ratio'] = ratio
            if type is None and not opts.urn:
                raise TypeError("Missing required property 'type'")
            __props__['type'] = type
            __props__['status'] = None
        super(BandwidthPackage, __self__).__init__(
            'alicloud:ga/bandwidthPackage:BandwidthPackage',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            auto_pay: Optional[pulumi.Input[bool]] = None,
            auto_use_coupon: Optional[pulumi.Input[bool]] = None,
            bandwidth: Optional[pulumi.Input[int]] = None,
            bandwidth_package_name: Optional[pulumi.Input[str]] = None,
            bandwidth_type: Optional[pulumi.Input[str]] = None,
            billing_type: Optional[pulumi.Input[str]] = None,
            cbn_geographic_region_ida: Optional[pulumi.Input[str]] = None,
            cbn_geographic_region_idb: Optional[pulumi.Input[str]] = None,
            description: Optional[pulumi.Input[str]] = None,
            duration: Optional[pulumi.Input[str]] = None,
            payment_type: Optional[pulumi.Input[str]] = None,
            ratio: Optional[pulumi.Input[int]] = None,
            status: Optional[pulumi.Input[str]] = None,
            type: Optional[pulumi.Input[str]] = None) -> 'BandwidthPackage':
        """
        Get an existing BandwidthPackage resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[bool] auto_pay: The auto pay. Valid values: `false`, `true`.
        :param pulumi.Input[bool] auto_use_coupon: The auto use coupon. Valid values: `false`, `true`.
        :param pulumi.Input[int] bandwidth: The bandwidth value of bandwidth packet.
        :param pulumi.Input[str] bandwidth_package_name: The name of the bandwidth packet.
        :param pulumi.Input[str] bandwidth_type: The bandwidth type of the bandwidth. Valid values: `Advanced`, `Basic`, `Enhanced`.
        :param pulumi.Input[str] billing_type: The billing type. Valid values: `PayBy95`, `PayByTraffic`.
        :param pulumi.Input[str] cbn_geographic_region_ida: Interworking area A of cross domain acceleration package. Only international stations support returning this parameter. Default value is `China-mainland`.
        :param pulumi.Input[str] cbn_geographic_region_idb: Interworking area B of cross domain acceleration package. Only international stations support returning this parameter. Default value is `Global`.
        :param pulumi.Input[str] description: The description of bandwidth package.
        :param pulumi.Input[str] duration: The duration.
        :param pulumi.Input[str] payment_type: The payment type of the bandwidth. Valid values: `PayAsYouGo`, `Subscription`. Default value is `Subscription`.
        :param pulumi.Input[int] ratio: The ratio.
        :param pulumi.Input[str] status: The status of the bandwidth plan.
        :param pulumi.Input[str] type: The type of the bandwidth packet. China station only supports return to basic. Valid values: `Basic`, `CrossDomain`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["auto_pay"] = auto_pay
        __props__["auto_use_coupon"] = auto_use_coupon
        __props__["bandwidth"] = bandwidth
        __props__["bandwidth_package_name"] = bandwidth_package_name
        __props__["bandwidth_type"] = bandwidth_type
        __props__["billing_type"] = billing_type
        __props__["cbn_geographic_region_ida"] = cbn_geographic_region_ida
        __props__["cbn_geographic_region_idb"] = cbn_geographic_region_idb
        __props__["description"] = description
        __props__["duration"] = duration
        __props__["payment_type"] = payment_type
        __props__["ratio"] = ratio
        __props__["status"] = status
        __props__["type"] = type
        return BandwidthPackage(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="autoPay")
    def auto_pay(self) -> pulumi.Output[Optional[bool]]:
        """
        The auto pay. Valid values: `false`, `true`.
        """
        return pulumi.get(self, "auto_pay")

    @property
    @pulumi.getter(name="autoUseCoupon")
    def auto_use_coupon(self) -> pulumi.Output[Optional[bool]]:
        """
        The auto use coupon. Valid values: `false`, `true`.
        """
        return pulumi.get(self, "auto_use_coupon")

    @property
    @pulumi.getter
    def bandwidth(self) -> pulumi.Output[int]:
        """
        The bandwidth value of bandwidth packet.
        """
        return pulumi.get(self, "bandwidth")

    @property
    @pulumi.getter(name="bandwidthPackageName")
    def bandwidth_package_name(self) -> pulumi.Output[Optional[str]]:
        """
        The name of the bandwidth packet.
        """
        return pulumi.get(self, "bandwidth_package_name")

    @property
    @pulumi.getter(name="bandwidthType")
    def bandwidth_type(self) -> pulumi.Output[Optional[str]]:
        """
        The bandwidth type of the bandwidth. Valid values: `Advanced`, `Basic`, `Enhanced`.
        """
        return pulumi.get(self, "bandwidth_type")

    @property
    @pulumi.getter(name="billingType")
    def billing_type(self) -> pulumi.Output[Optional[str]]:
        """
        The billing type. Valid values: `PayBy95`, `PayByTraffic`.
        """
        return pulumi.get(self, "billing_type")

    @property
    @pulumi.getter(name="cbnGeographicRegionIda")
    def cbn_geographic_region_ida(self) -> pulumi.Output[Optional[str]]:
        """
        Interworking area A of cross domain acceleration package. Only international stations support returning this parameter. Default value is `China-mainland`.
        """
        return pulumi.get(self, "cbn_geographic_region_ida")

    @property
    @pulumi.getter(name="cbnGeographicRegionIdb")
    def cbn_geographic_region_idb(self) -> pulumi.Output[Optional[str]]:
        """
        Interworking area B of cross domain acceleration package. Only international stations support returning this parameter. Default value is `Global`.
        """
        return pulumi.get(self, "cbn_geographic_region_idb")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        """
        The description of bandwidth package.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def duration(self) -> pulumi.Output[Optional[str]]:
        """
        The duration.
        """
        return pulumi.get(self, "duration")

    @property
    @pulumi.getter(name="paymentType")
    def payment_type(self) -> pulumi.Output[Optional[str]]:
        """
        The payment type of the bandwidth. Valid values: `PayAsYouGo`, `Subscription`. Default value is `Subscription`.
        """
        return pulumi.get(self, "payment_type")

    @property
    @pulumi.getter
    def ratio(self) -> pulumi.Output[Optional[int]]:
        """
        The ratio.
        """
        return pulumi.get(self, "ratio")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[str]:
        """
        The status of the bandwidth plan.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def type(self) -> pulumi.Output[str]:
        """
        The type of the bandwidth packet. China station only supports return to basic. Valid values: `Basic`, `CrossDomain`.
        """
        return pulumi.get(self, "type")

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

