1. Interface Description
Interface request domain name: cvm.api3.convergecloud.com.
This API (InquiryPriceRunInstances) is used to inquire about the price for creating an instance. This API allows only price inquiries for instance configurations within the purchase restriction range. For details, see RunInstances.
Default interface request rate limit: 10 times per second.
Interface update time: 2022-10-28 03:28:18.
The interface only verifies the signature but does not authenticate.
2. Input Parameters
The following list of request parameters only lists interface request parameters and some public parameters, For a complete list of public parameters see public request parameters.
| Parameter name | Required | Allow NULL | Type | Description |
|---|---|---|---|---|
| Action | Yes | No | String | Public parameter, The value of this interface: InquiryPriceRunInstances |
| Version | Yes | No | String | Public parameter, The value of this interface: 2017-03-12 |
| Region | No | No | String | Public parameter,Regional information A list of supported geographies is available through the DescribeRegions interface |
| InstanceChargeType | No | No | String | Instance billing type. Default value: POSTPAID_BY_HOUR. Example: PREPAID |
| InstanceChargePrepaid | No | No | InstanceChargePrepaid | Prepaid mode, that is, monthly subscription-related parameter settings. You can specify attributes of a monthly subscription instance, such as purchase duration and whether to set auto-renewal, through this parameter. If the billing mode of the specified instance is prepaid mode, this parameter is required. Example:View |
| Placement | Yes | No | Placement | Location of the instance. You can specify attributes such as the availability zone and project to which the instance belongs through this parameter. Example:View |
| InstanceType | No | No | String | Instance model. Different instance models specify different resource specifications. You can obtain the specific values by calling the API DescribeInstanceTypeConfigs to obtain the latest specification table. If this parameter is not specified, the default model is S1.SMALL1. Example: S5.MEDIUM2 |
| ImageId | Yes | No | String | Specify a valid Image ID, in the format of img-xxx. There are four types of images:You can obtain available image IDs in the following ways: Public Image, Custom Image, and Shared Image can be queried by logging in to the Console.Example: img-pmqg1cw7 |
| SystemDisk | No | No | SystemDisk | Instance system disk configuration information. If this parameter is not specified, it will be assigned based on the system default values. Example:View |
| DataDisks | No | No | Array of DataDisk | Instance data disk configuration information. If this parameter is not specified, no data disks are purchased by default. Multiple data disks can be specified when purchasing. Example:View |
| VirtualPrivateCloud | No | No | VirtualPrivateCloud | VPC-related information configuration. You can specify information such as VPC ID and subnet ID through this parameter. If this parameter is not specified, use the basic network by default. If a VPC IP is specified in this parameter, the InstanceCount parameter can only be 1. Example:View |
| InternetAccessible | No | No | InternetAccessible | Public bandwidth-related settings. If this parameter is not specified, the public bandwidth is 0 Mbps by default. Example:View |
| InstanceCount | No | No | Int64 | Number of instances to purchase. Value range: [1,100]. Default value: 1. The specified number of instances to purchase should not exceed the remaining quota of the user. Example: 1 |
| InstanceName | No | No | String | Instance display name. If not specified, it will be displayed as unnamed by default. Example: myInstance |
| LoginSettings | No | No | LoginSettings | Instance login settings. You can set login method, password, or key of the instance or retain the original login settings of the image. By default, a password will be randomly generated and notified to the user through Message Center. Example:View |
| SecurityGroupIds | No | No | Array of String | Security groups to which an instance belongs. If this parameter is not specified, do not bind the security group by default. Example: ["sg-efil73jd"] |
| EnhancedService | No | No | EnhancedService | Enhanced services. You can specify whether to enable services such as Cloud Security and Cloud Monitor through this parameter. If this parameter is not specified, the Cloud Monitor and Cloud Security is enabled by default. Example:View |
| ClientToken | No | No | String | String used to ensure request idempotency. This string is generated by the customer and should be unique across different requests. The maximum length should be no more than 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be ensured. For more detailed information, see: How to Ensure Idempotency. Example: 4668722c-b6d6-4f79-96fd-097ebe5318e5 |
| PurchaseSource | No | No | String | Internal parameters, purchase source. The source of the front-end call is MC. Example: API |
3. Output Parameters
| Parameter name | Type | Description |
|---|---|---|
| Price | Price | This parameter indicates the price for the corresponding configuration instance. Example:View |
| RequestId | String | Unique request id, Each request will return. The RequestId of the request needs to be provided when locating the problem. |
4. Error Code
The following lists only the error codes related to the interface business logic, For other error codes, see public ErrorCode.
| Error Code | Description |
|---|---|
| InvalidParameterValue | Invalid parameter value. The format of the parameter value is incorrect or not supported, etc. |
| AccountQualificationRestrictions | The requesting account did not pass the qualification audit. |
| InvalidParameterValue.Range | Invalid parameter value. The range of the parameter value is not legal. |
| InvalidInstanceName.TooLong | The string length of the specified InstanceName exceeds the limit. It should be less than or equal to 60 bytes. |
| InvalidParameterCombination | It indicates that the parameter combination is incorrect. |
| InvalidInstanceType.Malformed | The parameter format of the specified InstanceType is invalid. |
| InvalidHostId.NotFound | The specified HostId does not exist, or does not belong to the requesting account. |
| InvalidPeriod | Invalid duration. Currently, only the following durations are supported: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36], unit: months. |
| InstancesQuotaLimitExceeded | It indicates that the number of instances being created exceeds the remaining quota allowed for purchase by the account. |
| InvalidZone.MismatchRegion | The specified zone does not exist. |
| InvalidClientToken.TooLong | The string length of the specified ClientToken exceeds the limit. It should be less than or equal to 64 bytes. |
| MissingParameter | Parameters are missing. The request did not include mandatory parameters. |
| InvalidPassword | Invalid password. The specified password does not meet password complexity restrictions. For example, the password length does not meet restrictions. |
| InvalidPermission | The account does not support this operation. |
| InternalError.TradeUnknownError | An internal billing error occurred. |