tencent cloud

Elastic MapReduce

  • Release Notes and Announcements
  • Product Introduction
  • Purchase Guide
    • EMR on CVM Billing Instructions
    • EMR on TKE Billing Instructions
    • EMR Serverless HBase Billing Instructions
    • EMR Serverless TCBase Billing Overview
  • Getting Started
  • EMR on CVM Operation Guide
    • Planning Cluster
    • Administrative rights
    • Configuring Cluster
    • Managing Cluster
    • Managing Service
    • Monitoring and Alarms
    • TCInsight
  • EMR on TKE Operation Guide
  • EMR Serverless HBase Operation Guide
  • EMR Serverless TCBase Operation Guide
  • EMR Development Guide
    • Hadoop Development Guide
    • Spark Development Guide
    • HBase Development Guide
    • Phoenix on Hbase Development Guide
    • Hive Development Guide
    • Presto Development Guide
    • Sqoop Development Guide
    • Hue Development Guide
    • Oozie Development Guide
    • Flume Development Guide
    • Kerberos Development Guide
    • Knox Development Guide
    • Alluxio Development Guide
    • Kylin Development Guide
    • Livy Development Guide
    • Kyuubi Development Guide
    • Zeppelin Development Guide
    • Hudi Development Guide
    • Superset Development Guide
    • Impala Development Guide
    • Druid Development Guide
    • TensorFlow Development Guide
    • Kudu Development Guide
    • Ranger Development Guide
    • Kafka Development Guide
    • StarRocks Development Guide
    • Flink Development Guide
    • JupyterLab Development Guide
    • MLflow Development Guide
  • Practical Tutorial
    • Practice of EMR on CVM Ops
    • Data Migration
    • Practical Tutorial on Custom Scaling
  • API Documentation
    • History
    • Introduction
    • API Category
    • Making API Requests
    • Cluster Resource Management APIs
    • Cluster Service APIs
    • User Management APIs
    • Information Query APIs
    • Information Query APIs
    • Scaling APIs
    • Configuration APIs
    • Other APIs
    • Cluster Lifecycle APIs
    • Serverless HBase APIs
    • YARN Resource Scheduling APIs
    • Data Types
    • Error Codes
  • FAQs
    • EMR on CVM
  • Service Level Agreement
  • Contact Us

InquiryPriceCreateInstance

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-10-10 14:59:13

1. API Description

Domain name for API request: emr.intl.tencentcloudapi.com.

This API is used to inquire the price for instance creation.

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: 2019-01-03.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
TimeUnit Yes String

Time unit for purchasing instances. Valid values:

  • s: indicates seconds. When PayMode is set to 0, TimeUnit can only be set to s.
  • m: indicates months. When PayMode is set to 1, TimeUnit can only be set to m.
  • TimeSpan Yes Integer

    Instance purchase duration, which is used together with TimeUnit.

  • When TimeUnit is set to s, this parameter can only be set to 3600, indicating a pay-as-you-go instance.
  • When TimeUnit is set to m, the value set for this parameter indicates the subscription duration of the instance. For example, 1 indicates a one-month subscription.
  • Currency Yes String

    Currency type. Valid values:

  • CNY: RMB
  • PayMode Yes Integer

    Instance billing mode. Valid values:

  • 0: pay-as-you-go
  • 1: yearly/monthly subscription
  • SupportHA Yes Integer

    Whether to enable high availability for the node. Valid values:

  • 0: no
  • 1: yes
  • Software.N Yes Array of String

    List of deployed components. For different EMR product IDs, different required component lists need to be set (ProductId: For details about its meaning, see the ProductId parameter). Valid values:

  • When ProductId is set to 2 (EMR-V2.0.1), the required components include hdfs-2.7.3, yarn-2.7.3, zookeeper-3.4.9, and knox-1.2.0.
  • When ProductId is set to 16 (EMR-V2.3.0), the required components include hdfs-2.8.5, yarn-2.8.5, zookeeper-3.5.5, and knox-1.2.0.
  • When ProductId is set to 20 (EMR-V2.5.0), the required components include hdfs-2.8.5, yarn-2.8.5, zookeeper-3.6.1, and knox-1.2.0.
  • When ProductId is set to 30 (EMR-V2.6.0), the required components include hdfs-2.8.5, yarn-2.8.5, zookeeper-3.6.1, openldap-2.4.44, and knox-1.2.0.
  • When ProductId is set to 38 (EMR-V2.7.0), the required components include hdfs-2.8.5, yarn-2.8.5, zookeeper-3.6.3, openldap-2.4.44, and knox-1.6.1.
  • When ProductId is set to 57 (EMR-V2.8.0), the required components include hdfs-2.8.5, yarn-2.8.5, zookeeper-3.6.3, openldap-2.4.44, and knox-1.6.1.
  • When ProductId is set to 7 (EMR-V3.0.0), the required components include hdfs-3.1.2, yarn-3.1.2, zookeeper-3.4.9, and knox-1.2.0.
  • When ProductId is set to 25 (EMR-V3.1.0), the required components include hdfs-3.1.2, yarn-3.1.2, zookeeper-3.6.1, and knox-1.2.0.
  • When ProductId is set to 31 (EMR-V3.1.1), the required components include hdfs-3.1.2, yarn-3.1.2, zookeeper-3.6.1, and knox-1.2.0.
  • When ProductId is set to 28 (EMR-V3.2.0), the required components include hdfs-3.2.2, yarn-3.2.2, zookeeper-3.6.1, and knox-1.2.0.
  • When ProductId is set to 33 (EMR-V3.2.1), the required components include hdfs-3.2.2, yarn-3.2.2, zookeeper-3.6.1, openldap-2.4.44, and knox-1.2.0.
  • When ProductId is set to 34 (EMR-V3.3.0), the required components include hdfs-3.2.2, yarn-3.2.2, zookeeper-3.6.1, openldap-2.4.44, and knox-1.2.0.
  • When ProductId is set to 37 (EMR-V3.4.0), the required components include hdfs-3.2.2, yarn-3.2.2, zookeeper-3.6.3, openldap-2.4.44, and knox-1.6.1.
  • When ProductId is set to 44 (EMR-V3.5.0), the required components include hdfs-3.2.2, yarn-3.2.2, zookeeper-3.6.3, openldap-2.4.44, and knox-1.6.1.
  • When ProductId is set to 53 (EMR-V3.6.0), the required components include hdfs-3.2.2, yarn-3.2.2, zookeeper-3.6.3, openldap-2.4.44, and knox-1.6.1.
  • When ProductId is set to 58 (EMR-V3.6.1), the required components include hdfs-3.2.2, yarn-3.2.2, zookeeper-3.6.3, openldap-2.4.46, and knox-1.6.1.
  • When ProductId is set to 47 (EMR-V4.0.0), the required components include hdfs-3.2.2, yarn-3.2.2, zookeeper-3.6.3, openldap-2.4.44, and knox-1.6.1.
  • ResourceSpec No NewResourceSpec

    Node specifications for price inquiry.

    Placement No Placement

    Location of the instance. This parameter can be used to specify attributes such as the AZ and associated project of the instance.

    VPCSettings No VPCSettings

    VPC-related information configuration. This parameter can be used to specify the VPC ID, subnet ID, and so on.

    MetaType No String

    Hive shared metadata database type. Valid values:

  • EMR_NEW_META: created by the cluster by default
  • EMR_EXIT_METE: EMR-MetaDB specified by the cluster
  • USER_CUSTOM_META: custom MetaDB used by the cluster
  • UnifyMetaInstanceId No String

    EMR-MetaDB instance.

    MetaDBInfo No CustomMetaInfo

    Custom MetaDB information.

    ProductId No Integer

    Product ID. Different product IDs indicate different EMR product versions. Valid values:

  • 2: EMR-V2.0.1
  • 16: EMR-V2.3.0
  • 20: EMR-V2.5.0
  • 30: EMR-V2.6.0
  • 38: EMR-V2.7.0
  • 57: EMR-V2.8.0
  • 7: EMR-V3.0.0
  • 25: EMR-V3.1.0
  • 31: EMR-V3.1.1
  • 28: EMR-V3.2.0
  • 33: EMR-V3.2.1
  • 34: EMR-V3.3.0
  • 37: EMR-V3.4.0
  • 44: EMR-V3.5.0
  • 53: EMR-V3.6.0
  • 58: EMR-V3.6.1
  • 47: EMR-V4.0.0
  • SceneName No String

    Scenario-based values: Hadoop-Kudu, Hadoop-Zookeeper, Hadoop-Presto, and Hadoop-Hbase.

    ExternalService.N No Array of ExternalService

    Shared component information.

    VersionID No Integer

    Default value: 0. It is changed to 1 after the cross-AZ feature is supported.

    MultiZoneSettings.N No Array of MultiZoneSetting

    Specification information of the AZ.

    DefaultMetaVersion No String

    Database version.

    NeedCdbAudit No Integer

    Whether to enable audit. Valid values: 0 (no) and 1 (yes).

    MetaDBGroupInfo.N No Array of CustomMetaDBInfo

    Custom database data.

    3. Output Parameters

    Parameter Name Type Description
    OriginalCost Float

    Original price (CNY).

    DiscountCost Float

    Discounted price (CNY).

    TimeUnit String

    Time unit for purchasing instances. Valid values:

  • s: second
  • m: Month
  • TimeSpan Integer

    Instance purchase duration.

    PriceList Array of ZoneDetailPriceResult

    Price list.

    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 Inquiring the Price for Cluster Creation

    Input Example

    POST / HTTP/1.1
    Host: emr.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: InquiryPriceCreateInstance
    <Common request parameters>
    
    {
        "ProductId": 53,
        "PayMode": 1,
        "SupportHA": 1,
        "Software": [
            "hdfs-3.2.2",
            "yarn-3.2.2",
            "zookeeper-3.6.3",
            "openldap-2.4.44",
            "knox-1.6.1",
            "hive-3.1.3"
        ],
        "TimeUnit": "m",
        "TimeSpan": 1,
        "SceneName": "Hadoop-Default",
        "VersionID": 1,
        "MultiZoneSettings": [
            {
                "Placement": {
                    "ProjectId": "0",
                    "Zone": "100002"
                },
                "VPCSettings": {
                    "VpcId": "vpc-j5tovf55",
                    "SubnetId": ""
                },
                "ResourceSpec": {
                    "MasterResourceSpec": {
                        "InstanceType": "S2.2XLARGE16",
                        "Tags": [],
                        "Cpu": 4,
                        "MemSize": 1024,
                        "DiskSize": 14321,
                        "Spec": "SA5",
                        "StorageType": 1,
                        "DiskType": "CLOUD_SSD"
                    },
                    "MasterCount": 2,
                    "CoreResourceSpec": {
                        "InstanceType": "SA2.LARGE8",
                        "Tags": []
                    },
                    "CoreCount": 3,
                    "CommonResourceSpec": {
                        "InstanceType": "S2.MEDIUM4",
                        "Tags": []
                    },
                    "CommonCount": 3,
                    "TaskResourceSpec": {
                        "InstanceType": "SA2.LARGE8",
                        "Tags": []
                    },
                    "TaskCount": 0
                }
            }
        ],
        "MetaType": "EMR_DEFAULT_META",
        "DefaultMetaVersion": "mysql8",
        "NeedCdbAudit": 0,
        "ExternalService": [],
        "Currency": "CNY"
    }

    Output Example

    {
        "Response": {
            "DiscountCost": 5680.2,
            "OriginalCost": 5680.2,
            "PriceList": [
                {
                    "NodeDetailPrice": [
                        {
                            "NodeType": "Master",
                            "PartDetailPrice": [
                                {
                                    "GoodsNum": 2,
                                    "InstanceType": "Node",
                                    "Policy": 10,
                                    "Price": 828,
                                    "RealCost": 828,
                                    "RealTotalCost": 1656
                                },
                                {
                                    "GoodsNum": 2,
                                    "InstanceType": "System disk",
                                    "Policy": 10,
                                    "Price": 70,
                                    "RealCost": 70,
                                    "RealTotalCost": 140
                                },
                                {
                                    "GoodsNum": 2,
                                    "InstanceType": "Data disk",
                                    "Policy": 10,
                                    "Price": 200,
                                    "RealCost": 200,
                                    "RealTotalCost": 400
                                }
                            ]
                        },
                        {
                            "NodeType": "Common",
                            "PartDetailPrice": [
                                {
                                    "GoodsNum": 3,
                                    "InstanceType": "Node",
                                    "Policy": 10,
                                    "Price": 207,
                                    "RealCost": 207,
                                    "RealTotalCost": 621
                                },
                                {
                                    "GoodsNum": 3,
                                    "InstanceType": "System disk",
                                    "Policy": 10,
                                    "Price": 50,
                                    "RealCost": 50,
                                    "RealTotalCost": 150
                                },
                                {
                                    "GoodsNum": 3,
                                    "InstanceType": "Data disk",
                                    "Policy": 10,
                                    "Price": 200,
                                    "RealCost": 200,
                                    "RealTotalCost": 600
                                }
                            ]
                        },
                        {
                            "NodeType": "Core",
                            "PartDetailPrice": [
                                {
                                    "GoodsNum": 3,
                                    "InstanceType": "Node",
                                    "Policy": 10,
                                    "Price": 294.4,
                                    "RealCost": 294.4,
                                    "RealTotalCost": 883.2
                                },
                                {
                                    "GoodsNum": 3,
                                    "InstanceType": "System disk",
                                    "Policy": 10,
                                    "Price": 50,
                                    "RealCost": 50,
                                    "RealTotalCost": 150
                                },
                                {
                                    "GoodsNum": 3,
                                    "InstanceType": "Data disk",
                                    "Policy": 10,
                                    "Price": 200,
                                    "RealCost": 200,
                                    "RealTotalCost": 600
                                }
                            ]
                        },
                        {
                            "NodeType": "MySQL",
                            "PartDetailPrice": [
                                {
                                    "GoodsNum": 1,
                                    "InstanceType": "MetaDB",
                                    "Policy": 10,
                                    "Price": 480,
                                    "RealCost": 480,
                                    "RealTotalCost": 480
                                }
                            ]
                        }
                    ],
                    "ZoneId": "100002"
                }
            ],
            "RequestId": "f70d3401-e7eb-403e-b769-4df8185e552b",
            "TimeSpan": 1,
            "TimeUnit": "m"
        }
    }

    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.
    FailedOperation.GetCamServerFailed Failed to call the CAM service.
    FailedOperation.GetTradeServerFailed Failed to call the inquiry center service.
    InternalError.AccountCgwError Internal service call exception.
    InternalError.CamCgwError Internal service call exception.
    InternalError.CamError Internal service call exception.
    InternalError.CbsCgwError Internal service call exception.
    InternalError.CbsError Internal service call exception.
    InternalError.CdbCgwError Internal service call exception.
    InternalError.CdbError Internal service call exception.
    InternalError.ConfigCgwError Internal service call exception.
    InternalError.CvmError Internal service call exception.
    InternalError.KmsError Internal service call exception.
    InternalError.ProjectCgwError Internal service call exception.
    InternalError.SgError An exception occurred when the security group API is called.
    InternalError.TagError Internal service call exception.
    InternalError.TradeCgwError Internal service call exception.
    InternalError.VpcCgwError Internal service call exception.
    InternalError.VpcError Internal service call exception.
    InvalidParameter Parameter error.
    InvalidParameter.HALessMasterCount Parameter error.
    InvalidParameter.IncorrectCommonCount Invalid Common node quantity.
    InvalidParameter.IncorrectMasterCount Invalid Master node quantity.
    InvalidParameter.InvalidCommonDiskType Parameter error.
    InvalidParameter.InvalidCoreCount Invalid Core node quantity.
    InvalidParameter.InvalidInstanceType Invalid instance type.
    InvalidParameter.InvalidMasterDiskType Parameter error.
    InvalidParameter.InvalidResourceSpec Invalid resource specifications.
    InvalidParameter.InvalidSoftWareName Invalid software name.
    InvalidParameter.InvalidTimeUnit Invalid TimeUnit.
    InvalidParameter.InvalidUnifyMeta Invalid unified metadata database.
    InvalidParameter.InvalidZone Invalid AZ.
    InvalidParameter.NotContainMustSelectSoftware Invalid parameter. It does not contain required components.
    InvalidParameter.SoftwareNotInProduct Invalid product components exist.
    InvalidParameterValue Parameter value error.
    MissingParameter Missing parameter error.
    ResourceInsufficient.DiskInsufficient The specifications of the hard disk do not meet the requirements.
    ResourceInsufficient.InstanceInsufficient The node specifications are not supported or have been sold out.
    ResourceNotFound.SubnetNotFound The corresponding subnet cannot be found.
    ResourcesSoldOut Resources have been sold out.
    ResourcesSoldOut.CbsSoldOut CBS resources have been sold out.
    ResourcesSoldOut.CvmSoldOut CVMs have been sold out.
    UnknownParameter Unknown parameter error.
    UnsupportedOperation The operation is not supported.

    Bantuan dan Dukungan

    Apakah halaman ini membantu?

    masukan