InquiryPriceCreateInstance

1. API Description

This API (InquiryPriceCreateInstance) is used to query the price of creating an elastic compute instance.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

zoneId

Yes

String

Zone ID to which the instance belongs.

instanceType

Yes

String

Instance type.

Specific values can be obtained by calling the interface DescribeZoneInstanceConfigInfos .

internetChargeType

Yes

Network billing method.

instanceCount

Yes

Integer

Quantity.

Default value: 1.

Value range: [1, 100]

Default value: 1

systemDisk

Yes

Boot disk.

eipV4Type [Deprecated]

No

The network type of the public IPv4. Ensure that the stack type of the selected subnet supports IPv4.

ThreeLine are not currently supported.

Deprecated. Please use networkLineType instead.

networkLineType

No

The network type of the public IPv4. Ensure that the stack type of the selected subnet supports IPv4.

ThreeLine are not currently supported.

trafficPackageSize

No

Float

Data transfer package size (TB).

The unit is TB. The parameter is only required when internetChargeType is ByTrafficPackage .

Value range: [0.0, +)

bandwidth

No

Integer

Outbound public network bandwidth cap (Mbps).

Unit: Mbps.

The value differs with different instance types.

Value range: [1, +)

dataDisk

No

The size of the attached disk.

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request.

RequestId is required for locating a problem.

specPrice

Price of specifications.

gpuPrice

GPU price.

ipv4Price

IPv4 price.

ipv4BandwidthPrice

Public network IPv4 bandwidth price.

ipv6Price

IPv6 price.

ipv6BandwidthPrice

Public network IPv6 bandwidth price.

systemDiskPrice

Price of the boot disk.

dataDiskPrice

The price of the attached disk.

4. Code Example

Query the price of a pay-as-you-go instance with the public network billing method of flat rate.

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs,to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

HTTP Status Code
Error Code
Description

400

INVALID_DISK_CATEGORY_TYPE

Disk type error.

404

INVALID_INSTANCE_TYPE_NOT_FOUND

Instance type not found.

404

INVALID_ZONE_NOT_FOUND

Region does not exist.

400

OPERATION_DENIED_EIP_UNSUPPORT_NETWORK_TYPE

Elastic IP network billing model is not supported.

Last updated