InquiryPriceCreateInstance

Last updated: 2019-07-22 16:53:16

1. API Description

API domain name: emr.tencentcloudapi.com.

This API inquires about the price of creating an instance

Default API request rate limit: 20 requests/sec.

2. Input Parameters

The following parameters are required for requesting this API, including action-specific parameters and common parameters. For more information about common parameters for all requests, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The name of this API: InquiryPriceCreateInstance
Version Yes String Common parameter. The version of this API: 2019-01-03
Region Yes String Common parameter. For more information, see the list of regions supported by the product.
TimeUnit Yes String Time unit
TimeSpan Yes Integer Time span
ResourceSpec Yes ResourceSpec Description of the inquired resource
Currency Yes String Currency
PayMode Yes Integer Billing method
SupportHA Yes Integer Whether HA is supported. 1: yes; 0: no
Software.N Yes Array of String Software list
Placement Yes Placement Location information
VPCSettings Yes VPCSettings VPC information

3. Output Parameters

Parameter name Type Description
Result InquiryPriceResult Price inquiry result
RequestId String The ID of the request. Each request returns a unique ID. The RequestId is required to troubleshoot issues.

4. Examples

Example 1. Inquiring About the Price of Creating an Instance

Input Sample Code

https://emr.tencentcloudapi.com/?Action=InquiryPriceCreateInstance
&Region=ap-beijing
&TimeUnit=m
&TimeSpan=1
&Placement.Zone=ap-chongqing-1
&Currency=CNY
&PayMode=1
&SupportHA=0
&Software.0=hadoop-2.7.3
&Software.1=zookeeper-3.4.9
&ResourceSpec.MasterResourceSpec.Memory=8192
&ResourceSpec.MasterResourceSpec.CPUCores=4
&ResourceSpec.MasterResourceSpec.Volume=100
&ResourceSpec.MasterResourceSpec.DiskType=CLOUD_PREMIUM
&ResourceSpec.MasterResourceSpec.Spec=CVM.S3
&ResourceSpec.MasterResourceSpec.RootDiskVolume=100
&ResourceSpec.MasterResourceSpec.StorageType=5
&ResourceSpec.CoreResourceSpec.Memory=8192
&ResourceSpec.CoreResourceSpec.CPUCores=4
&ResourceSpec.CoreResourceSpec.Volume=100
&ResourceSpec.CoreResourceSpec.DiskType=CLOUD_PREMIUM
&ResourceSpec.CoreResourceSpec.Spec=CVM.S3
&ResourceSpec.CoreResourceSpec.RootDiskVolume=100
&ResourceSpec.CoreResourceSpec.StorageType=5
&ResourceSpec.MasterCount=1
&ResourceSpec.CoreCount=2
&VPCSettings.VpcId=vpc-5p4i6ned
&VPCSettings.SubnetId=subnet-r19p3f8k
&<Common request parameter>

Output Sample Code

{
  "Response": {
    "Result": {
      "OriginalCost": 1557.99,
      "DiscountCost": 1049.44,
      "TimeUnit": "m",
      "TimeSpan": 1
    },
    "RequestId": "df9bfbd5-f182-446c-8827-56bff931e343"
  }
}

5. Developer Resources

API Explorer

This tool provides various capabilities such as online call, signature verification, SDK code generation, and quick API retrieval that significantly reduce the difficulty of using TencentCloud API.

SDK

TencentCloud API 3.0 integrates software development toolkits (SDKs) that support various programming languages to make it easier for you to call the APIs.

TCCLI

6. Error Codes

The following error codes are API business logic-related. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
InvalidParameter Incorrect parameter.
InvalidParameterValue Invalid parameter value.
MissingParameter A parameter is missing.
UnknownParameter Unknown parameter.
UnsupportedOperation Unsupported operation.