tencent cloud

文档反馈

InquiryPriceCreateLoadBalancer

最后更新时间:2024-09-05 19:29:28

    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 Specification of the LCU-supported instance, which is input to query the monthly subscription price. Valid values:
  • clb.c2.medium: Standard
  • clb.c3.small: Advanced 1
  • clb.c3.medium: Advanced 2
  • clb.c4.small: Super Large 1
  • clb.c4.medium: Super Large 2
  • clb.c4.large: Super Large 3
  • clb.c4.xlarge: Super Large 4
  • SLA is input to query the pay-as-you-go price.
    AddressIPVersion No String IP version. Valid values: IPV4 (default), IPV6 (IPV6 NAT64 version) or IPv6FullChain (IPv6 version).
    VipIsp No String It only applies to public CLB. Currently, the static single-line IP type is supported only for the regions of Guangzhou, Shanghai, Nanjing, Jinan, Hangzhou, Fuzhou, Beijing, Shijiazhuang, Wuhan, Changsha, Chengdu, and Chongqing. If you need to experience it, contact your business manager. After approval, you can select the ISP type as China Mobile (CMCC), China Unicom (CUCC), or China Telecom (CTCC). The network billing mode should be selected as billing by bandwidth package (BANDWIDTH_PACKAGE). If this parameter is not specified, BGP is used by default. You can use the DescribeResources API to query ISPs supported for a region.

    3. Output Parameters

    Parameter Name Type Description
    Price Price Price of the instance with the specified configurations.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying the Price for Creating a Prepaid CLB Instance

    This example shows you how to query the price for creating a prepaid 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": {
                "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 Price for Creating a Pay-as-You-Go CLB Instance in the Pay-as-You-Go Network Billing Mode

    This example shows you how to query the price for creating a pay-as-you-go CLB instance in the pay-as-you-go network billing mode.

    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": 48,
                    "ChargeUnit": "Mbps/MONTH",
                    "OriginalPrice": null,
                    "DiscountPrice": null
                },
                "LcuPrice": null
            },
            "RequestId": "19a2e45d-ed96-4f60-a954-99a4d41752f3"
        }
    }
    

    Example3 Querying the Price for Creating a Pay-as-You-Go CLB Instance in the Network Billing Mode by Bandwidth Package

    This example shows you how to query the price for creating a pay-as-you-go CLB instance in the network billing mode by bandwidth package.

    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": 0.04,
                    "ChargeUnit": "HOUR",
                    "OriginalPrice": null,
                    "DiscountPrice": null
                },
                "LcuPrice": null
            },
            "RequestId": "835f9cd8-6af1-4ac6-8fc3-2a9f900b7fff"
        }
    }
    

    Example4 Querying the Price for Creating a Pay-as-You-Go CLB Instance in the Network Billing Mode by Bandwidth

    This example shows you how to query the price for creating a pay-as-you-go CLB instance in the network billing mode by bandwidth.

    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": {
                "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.
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持