tencent cloud

Feedback

InquiryPriceCreateInstance

Last updated: 2024-04-03 11:33:09

    1. API Description

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

    This API is used to query the price for purchasing an 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: InquiryPriceCreateInstance.
    Version Yes String Common Params. The value used for this API: 2018-04-12.
    Region No String Common Params. This parameter is not required for this API.
    TypeId Yes Integer Instance type. Valid values: 2 (Redis 2.8 memory edition in standard architecture), 3 (CKV 3.2 memory edition in standard architecture), 4 (CKV 3.2 memory edition in cluster architecture), 6 (Redis 4.0 memory edition in standard architecture), 7 (Redis 4.0 memory edition in cluster architecture), 8 (Redis 5.0 memory edition in standard architecture), 9 (Redis 5.0 memory edition in cluster architecture).
    MemSize Yes Integer Memory capacity in MB, which must be a multiple of 1,024. It is subject to the purchasable specifications returned by the DescribeProductInfo API.
    If TypeId indicates the standard architecture, MemSize indicates the total memory capacity of an instance; if TypeId indicates the cluster architecture, MemSize indicates the memory capacity per shard.
    GoodsNum Yes Integer Number of instances. The actual quantity purchasable at a time is subject to the specifications returned by the DescribeProductInfo API.
    Period Yes Integer Length of purchase in months, which is required when creating a monthly-subscribed instance. Value range: [1,2,3,4,5,6,7,8,9,10,11,12,24,36]. For pay-as-you-go instances, set the parameter to 1.
    BillingMode Yes Integer Billing mode. Valid values: 0 (pay-as-you-go), 1 (monthly subscription).
    ZoneId No Integer ID of the AZ where the instance resides. For more information, see Regions and AZs.
    RedisShardNum No Integer Instance shard quantity. This field is not required by Redis 2.8 standard architecture, CKV standard architecture, Redis 2.8 standalone edition, and Redis 4.0 standard architecture.
    RedisReplicasNum No Integer Instance replica quantity. This field is not required by Redis 2.8 standard architecture, CKV standard architecture, and Redis 2.8 standalone edition.
    ReplicasReadonly No Boolean Whether to support read-only replicas. This field is not required by Redis 2.8 standard architecture, CKV standard architecture, and Redis 2.8 standalone edition.
    ZoneName No String Name of the AZ where the instance resides. For more information, see Regions and AZs.
    ProductVersion No String Valid values: local (local disk edition), cloud (cloud disk edition), cdc (dedicated cluster edition). Default value: local (local disk edition)

    3. Output Parameters

    Parameter Name Type Description
    Price Float Price. Unit: USD (accurate down to the cent)
    Note: This field may return null, indicating that no valid values can be obtained.
    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 Sample

    Input Example

    https://redis.tencentcloudapi.com/?Action=InquiryPriceCreateInstance
    &ZoneId=100002
    &TypeId=6
    &MemSize=4096
    &GoodsNum=1
    &Period=1
    &BillingMode=1
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "Price": 30400,
            "RequestId": "0115d979-2c38-4ad2-b282-bec09d5b4c0b"
        }
    }
    

    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.SystemError Internal system error, which is irrelevant to the business.
    InternalError.InternalError Internal error.
    InvalidParameter.PermissionDenied The API has no CAM permissions.
    InvalidParameterValue.SpecNotExist The instance specification doesn’t exist.
    UnauthorizedOperation.NoCAMAuthed No CAM permissions.
    UnauthorizedOperation.UserNotInWhiteList The user is not in the allowlist.
    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