tencent cloud

Feedback

InquireCkafkaPrice

Last updated: 2023-07-05 15:57:46

1. API Description

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

This API is used to purchase a CKafka instance or query the instance renewal price.

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: InquireCkafkaPrice.
Version Yes String Common Params. The value used for this API: 2019-08-19.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceType Yes String standard: Standard Edition; profession: Pro Edition
InstanceChargeParam No InstanceChargeParam Billing mode for instance purchase/renewal. If this parameter is left empty when you purchase an instance, the fees for one month under the monthly subscription mode will be displayed by default.
InstanceNum No Integer The number of instances to be purchased or renewed. If this parameter is left empty, the default value is 1.
Bandwidth No Integer Private network bandwidth in MB/sec, which is required when you purchase an instance.
InquiryDiskParam No InquiryDiskParam Disk type and size, which is required when you purchase an instance.
MessageRetention No Integer Message retention period in hours, which is required when you purchase an instance.
Topic No Integer The number of instance topics to be purchased, which is required when you purchase an instance.
Partition No Integer The number of instance partitions to be purchased, which is required when you purchase an instance.
ZoneIds.N No Array of Integer The region for instance purchase, which can be obtained via the DescribeCkafkaZone API.
CategoryAction No String Operation type flag. purchase: Making new purchases; renew: Renewing an instance. The default value is purchase if this parameter is left empty.
BillType No String This field is not required.
PublicNetworkParam No InquiryPublicNetworkParam Billing mode for public network bandwidth, which is required when you purchase public network bandwidth. Currently, public network bandwidth is only supported for Pro Edition.
InstanceId No String ID of the instance to be renewed, which is required when you renew an instance.

3. Output Parameters

Parameter Name Type Description
Result InquireCkafkaPriceResp Output parameters
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying the price of a CKafka instance

Input Example

POST / HTTP/1.1
Host: ckafka.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: InquireCkafkaPrice
<Common request parameters>

{
    "Partition": 40,
    "InstanceNum": 1,
    "InquiryDiskParam": {
        "DiskSize": 500,
        "DiskType": "SSD"
    },
    "ZoneIds": [
        100001
    ],
    "Topic": 30,
    "Bandwidth": 40,
    "MessageRetention": 4,
    "PublicNetworkParam": {
        "PublicNetworkChargeType": "BANDWIDTH_PREPAID",
        "PublicNetworkMonthly": 10
    },
    "InstanceChargeParam": {
        "InstanceChargePeriod": 1,
        "InstanceChargeType": "PREPAID"
    },
    "InstanceType": "profession",
    "CategoryAction": "purchase"
}

Output Example

{
    "Response": {
        "Result": {
            "InstancePrice": {
                "DiscountPrice": 0.0,
                "GoodsNum": 0,
                "TimeSpan": 0,
                "DetailPrices": {
                    "TopicPrice": {
                        "DiscountPrice": 0.0,
                        "Value": 0,
                        "Discount": 0.0,
                        "OriginalPrice": 0.0,
                        "UnitPriceDiscount": 0.0,
                        "UnitPrice": 0.0
                    },
                    "PartitionPrice": {
                        "DiscountPrice": 0.0,
                        "Value": 0,
                        "Discount": 0.0,
                        "OriginalPrice": 0.0,
                        "UnitPriceDiscount": 0.0,
                        "UnitPrice": 0.0
                    },
                    "BandwidthPrice": {
                        "DiscountPrice": 0.0,
                        "Value": 0,
                        "Discount": 0.0,
                        "OriginalPrice": 0.0,
                        "UnitPriceDiscount": 0.0,
                        "UnitPrice": 0.0
                    }
                },
                "Discount": 0.0,
                "OriginalPrice": 0.0,
                "TimeUnit": "xx",
                "UnitPriceDiscount": 0.0,
                "Currency": "xx",
                "UnitPrice": 0.0
            },
            "PublicNetworkBandwidthPrice": {
                "DiscountPrice": 0.0,
                "GoodsNum": 0,
                "TimeSpan": 0,
                "DetailPrices": {},
                "Value": 0,
                "Discount": 0.0,
                "OriginalPrice": 0.0,
                "TimeUnit": "xx",
                "UnitPriceDiscount": 0.0,
                "Currency": "xx",
                "UnitPrice": 0.0
            }
        },
        "RequestId": "xx"
    }
}

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
AuthFailure CAM signature/authentication error.
FailedOperation Operation failed.
InternalError Internal error.
InvalidParameter Invalid parameter.
InvalidParameterValue Invalid parameter value.
MissingParameter Missing parameter