Last updated: 2018-10-12 16:02:16PDF
Welcome to the Cloud Virtual Machine.
The Cloud Virtual Machine (CVM), which runs at the Tencent IDC, provides auto scaling computing services and can be used to build and host software systems based on your business needs.
The CVM solution delivers a flexible set of computing, storage and network resources. You can use the APIs described in this document and refer to the examples to create, terminate and restart CVMs, and adjust bandwidth for them. For a full list of the supported operations, please see the API Overview.
Before using these APIs, please make sure that you have a thorough understanding of CVM Overview.
- All CVM APIs under this module have been upgraded to API 3.0. All new CVM-related features are added to the APIs under this module. We recommend that new users use the upgraded API 3.0.
- The features of old APIs remain available. For more information, please see CVM API Overview (old).
The common terms involved in this document are as follows:
|Instance||Instance||Instance||A cloud virtual machine.|
|Region||Region||Region||A region where resources reside. Each region contains multiple availability zones.|
|Zone||Zone||Availability zone||Refers to Tencent Cloud's physical IDCs whose power and network are independent from each other within the same region. They are designed to ensure that the failures within an availability zone can be isolated without spreading to and affecting other zones so that users' businesses can provide continuous online services.|
|Image||Image||Image||A copy of the software environment on a CVM instance, generally including operation systems and installed software. It is used to create an instance.|
|SecurityGroup||Security Group||Security Group||A virtual firewall that allows state-based packet filtering. As an important network security isolation tool, it is used to control the network access of CVM instances.|
|EIP||Elastic IP||EIP||A type of public IP. Unlike an ordinary public IP, an EIP belongs to a user account rather than an instance. The mapping relationship between an instance and a public IP can be changed at any time.|
|None||None||Prepaid||A billing method. For more information, please see Billing Methods.|
|None||None||Postpaid||A billing method. For more information, please see Billing Methods.|
Definitions of input and response parameters
Limit and Offset
These parameters are used to control paging. "Limit" indicates the maximum number of entries returned at a time, and "Offset" is the offset value. For the results in a list format, if the number of entries exceeds the "Limit" value, the number of returned values will be limited to the "Limit" value.
For example, if Offset=0&Limit=20, the 0st to 20th entries are returned; if Offset=20&Limit=20, the 20th to 40th entries are returned; if Offset=40&Limit=20, the 40th to 60th entries are returned, and so on.
Format for inputting multiple parameters at a time. Multiple parameters in such a format can be input at the same time. For example:
And so on (with subscripts starting with 0).
Getting Started with API
The following introduces how to use CVM APIs in some typical scenarios:
Create an postpaid instance by using the API Create Instances and providing information like availability zone ID, image ID, model and other parameters.
Upgrade the configuration of an instance using the API Adjust Instance Configuration. You can also change the CPU and memory by adjusting instance models.
Shut down an instance using the API Shut Down Instances.
- If you do not want to use an instance any more, you can terminate it using the API Return Instances. No fee will apply once the instance is returned.
The CVMs created via the API are subject to the number limit described in the Restrictions on CVM Instance Purchase, and share the quota with those created on the official website.
- For more information on specific limits, please see the documents for appropriate APIs or products.