tencent cloud

Feedback

InquiryPriceCreateLoadBalancer

Last updated: 2023-10-24 11:16:04

    1. API Description

    Domain name for API request: clb.tencentcloudapi.com.

    This API is used to query the price of creating a CLB instance.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: InquiryPriceCreateLoadBalancer.
    Version Yes String Common Params. The value used for this API: 2018-03-17.
    Region No String Common Params. This parameter is not required for this API.
    LoadBalancerType Yes String Network type of the CLB to query. OPEN: Public network; INTERNAL: Private network is intranet type
    LoadBalancerChargeType Yes String The billing mode to query. POSTPAID:Pay as you go
    LoadBalancerChargePrepaid No LBChargePrepaid Reserved field
    InternetAccessible No InternetAccessible The network billing mode to query
    GoodsNum No Integer Number of CLB instances to query. Default value: 1.
    ZoneId No String Availability zone in the format of "ap-guangzhou-1"
    SlaType No String To query the price of monthly subscribed LCU-supported instances, specify the instance specification in this parameter, such as clb.c3.small. For PAYG instances, use SLA.
    AddressIPVersion No String IP version. Valid values: IPV4 (default), IPV6 (IPV6 NAT64 version) or IPv6FullChain (IPv6 version).
    VipIsp No String ISP of VIP. Values: CMCC (China Mobile), CUCC (China Unicom) and CTCC (China Telecom). You need to activate static single-line IPs. This feature is in beta and is only available in Guangzhou, Shanghai, Nanjing, Jinan, Hangzhou, Fuzhou, Beijing, Shijiazhuang, Wuhan, Changsha, Chengdu and Chongqing regions. To try it out, please contact your sales rep. If it's specified, the network billing mode must be BANDWIDTH_PACKAGE. If it's not specified, BGP is used by default. To query ISPs supported in a region, please use DescribeResources.

    3. Output Parameters

    Parameter Name Type Description
    Price Price Price of the instance with the specified configurations.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the traffic-based network pricing of creating a PAYG CLB instance

    This example shows you how to query the traffic-based network pricing of creating a PAYG CLB instance.

    Input Example

    https://clb.tencentcloudapi.com/?Action=InquiryPriceCreateLoadBalancer
    &LoadBalancerType=OPEN
    &LoadBalancerChargeType=POSTPAID
    &InternetAccessible.InternetChargeType=TRAFFIC_POSTPAID_BY_HOUR
    &InternetAccessible.InternetMaxBandwidthOut=1
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "Price": {
                "InstancePrice": {
                    "UnitPrice": 0.02,
                    "ChargeUnit": "HOUR",
                    "OriginalPrice": null,
                    "DiscountPrice": null
                },
                "BandwidthPrice": {
                    "UnitPrice": 0.8,
                    "ChargeUnit": "GB",
                    "OriginalPrice": null,
                    "DiscountPrice": null
                },
                "LcuPrice": null
            },
            "RequestId": "f4953b5c-990c-49fa-9937-7aebef241d42"
        }
    }
    

    Example2 Querying the bandwidth-based network pricing of creating a PAYG CLB instance

    This example shows you how to query the bandwidth-based network pricing of creating a PAYG CLB instance.

    Input Example

    https://clb.tencentcloudapi.com/?Action=InquiryPriceCreateLoadBalancer
    &LoadBalancerType=OPEN
    &LoadBalancerChargeType=POSTPAID
    &InternetAccessible.InternetChargeType=BANDWIDTH_POSTPAID_BY_HOUR
    &InternetAccessible.InternetMaxBandwidthOut=1
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "Price": {
                "InstancePrice": {
                    "UnitPrice": 0.02,
                    "ChargeUnit": "HOUR",
                    "OriginalPrice": null,
                    "DiscountPrice": null
                },
                "BandwidthPrice": {
                    "UnitPrice": 0.04,
                    "ChargeUnit": "HOUR",
                    "OriginalPrice": null,
                    "DiscountPrice": null
                },
                "LcuPrice": null
            },
            "RequestId": "835f9cd8-6af1-4ac6-8fc3-2a9f900b7fff"
        }
    }
    

    Example3 Quering the bandwidth package price of creating a PAYG CLB instance

    This example shows you how to query the bandwidth package price of creating a PAYG CLB instance.

    Input Example

    https://clb.tencentcloudapi.com/?Action=InquiryPriceCreateLoadBalancer
    &LoadBalancerType=OPEN
    &LoadBalancerChargeType=POSTPAID
    &GoodsNum=1
    &InternetAccessible.InternetChargeType=BANDWIDTH_PACKAGE
    &InternetAccessible.BandwidthpkgSubType=SINGLEISP
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "Price": {
                "InstancePrice": {
                    "UnitPrice": 0.02,
                    "ChargeUnit": "HOUR",
                    "OriginalPrice": null,
                    "DiscountPrice": null
                },
                "BandwidthPrice": {
                    "UnitPrice": 48,
                    "ChargeUnit": "Mbps/MONTH",
                    "OriginalPrice": null,
                    "DiscountPrice": null
                },
                "LcuPrice": null
            },
            "RequestId": "19a2e45d-ed96-4f60-a954-99a4d41752f3"
        }
    }
    

    Example4 Query the price to create a monthly-subscribed CLB instance

    This example shows you how to query the price to create a monthly-subscribed CLB instance.

    Input Example

    https://clb.tencentcloudapi.com/?Action=InquiryPriceCreateLoadBalancer
    &LoadBalancerType=OPEN
    &LoadBalancerChargeType=PREPAID
    &GoodsNum=1
    &InternetAccessible.InternetChargeType=BANDWIDTH_PREPAID
    &InternetAccessible.InternetMaxBandwidthOut=1
    &LoadBalancerChargePrepaid.Period=1
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "Price": {
                "BandwidthPrice": null,
                "InstancePrice": {
                    "OriginalPrice": 37.4,
                    "DiscountPrice": 37.4,
                    "UnitPrice": null,
                    "ChargeUnit": null
                },
                "LcuPrice": null
            },
            "RequestId": "52f22ea7-3592-4ff0-9d63-a5cc14b79859"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation Operation failed.
    InternalError Internal error.
    InvalidParameter Parameter error.
    InvalidParameterValue Incorrect parameter value.
    UnauthorizedOperation Unauthorized operation.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support