tencent cloud

文档反馈

Introduction

最后更新时间:2022-10-10 16:48:24

    Welcome to Cloud Virtual Machine (CVM).

    Tencent Cloud CVM runs in Tencent IDC and provides scalable computing service. You can build and host software systems based on your business requirements.

    CVM provides you with elastic computing, storage, and network resources. This document describes APIs for CVMs, and provides samples to create, terminate, and restart CVM instances and adjust bandwidth for them. For a full list of supported operations, see API Overview.

    Please read CVM Overview before using these APIs.

    Notes:

    • All CVM APIs described here have been upgraded to API 3.0. All new CVM-related features will be added to these APIs.

    Glossary

    Below is the list of common terms used in this document:

    Term Description
    Instance A cloud virtual machine, see Instance
    Region A region where resources reside. Each region contains one or more availability zones. See Region
    Zone Tencent Cloud physical IDCs in the same region with independent power and network resources. They are designed to ensure that the failures within an availability zone can be isolated without spreading to and affecting other zones, so as to ensure your business stability. See Availability Zone
    Image A copy of the software environment on a CVM instance, generally including operating systems and installed software. It is used to create an instance. See Image
    Security Group A type of virtual firewall with a state-based packet filtering feature. It is an important network security isolation method to control the network access of CVM instances. See Security Group
    EIP A type of public IP. Unlike an ordinary public IP, an elastic IP belongs to a user account rather than an instance. The mapping relationship between an instance and a public IP address can be changed at any time. See EIP
    Monthly subscription A billing method. For more information, see Billing Methods.
    Pay as you go A billing method. For more information, see Billing Methods.

    Request and response parameters

    • Limit and Offset

      These parameters are used for paging control. Limit indicates the maximum number of entries returned at a time, and Offset is the offset value. If the number of results exceeds the Limit, the number of returned results equals to the value of Limit.

      For example, if Offset=0&Limit=20, the 0th to 19th entries are returned; if Offset=20&Limit=20, the 20th to 39th entries are returned; if Offset=40&Limit=20, the 40th to 59th entries are returned, and so on.

    • Ids.N

      Format for entering multiple parameters at a time. Multiple parameters can be passed in at the same time in this form. For example:

      GET request or POST x-www-form-urlencoded request: Ids.0=ins-r8hr2upy&Ids.1=ins-5d8a23rs&Ids.2=ins--dcs9x3gz

      The others can be done in the same manner (starting with 0).

      POST json request: {"Ids": ["ins-r8hr2upy", "ins-5d8a23rs", "ins-dcs9x3gz"]}

    Getting Started with APIs

    The following describes some typical use cases for CVM APIs:

    1. Create a pay-as-you-go instance by using the RunInstances API and providing information like availability zone ID, image ID, model and other parameters.

    2. Upgrade the configuration of an instance using the ResetInstancesType API. You can change CPU and memory by adjusting instance models.

    3. Shut down an instance using the StopInstances API.

    4. If you do not want to use an instance anymore, you can terminate it using the TerminateInstances API. No more fees will be incurred once the instance is terminated.

    Limits

    • The CVM instances 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 in the console.

    • For information on specific limits, see documents for corresponding APIs or products.