tencent cloud

APIs

CreateInstances

Focus Mode
Font Size
Last updated: 2026-04-27 16:54:49

1. API Description

Domain name for API request: edgezone.intl.tencentcloudapi.com.

This API is used to create a physical machine instance. The system automatically allocates physical machine resources and completes installation. If the user is not in the current availability zone, the system automatically enables billing. It supports concurrent allocation of physical machine resources and async execution of network assignment and installation tasks.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateInstances.
Version Yes String Common Params. The value used for this API: 2026-04-01.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Zone Yes String Availability zone code, such as ap-guangzhou-1.
InstanceType Yes String Model specifications, such as BMS5.MEDIUM8.
InstanceName Yes String Instance name.
PrivateNetworkId Yes String Private network instance ID in the format of net-xxx.
PublicNetworkId Yes String Public network instance ID, in the format of net-xxx.
ImageId No String Image ID, for example img-centos-7.9.
InstanceCount No Integer Specify the quantity. Default is 1. Maximum is 50.
VersionNumber No String Image version number. Only public images have the concept of version.
EnableIpv6 No Boolean Whether to enable public IPv6, default false. Enabled, the system will allocate an additional IPv6 address after assigning an IPv4 address.

3. Output Parameters

Parameter Name Type Description
InstanceIdSet Array of String List of successfully created instance IDs.
FailedCount Integer Count of failed instances. This field is returned only when partially failed, not returned when all successful.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Create a physical machine instance

Create a physical machine instance in Guangzhou Zone 1, use the CentOS 7.9 mirror, and enable IPv6.

Input Example

POST / HTTP/1.1
Host: edgezone.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateInstances
<Common request parameters>

{
    "Zone": "ap-guangzhou-1",
    "InstanceType": "BMS5.MEDIUM8",
    "ImageId": "img-centos-7.9",
    "InstanceName": "my-epm-instance",
    "InstanceCount": 1,
    "VersionNumber": "7.9.2009",
    "PrivateNetworkId": "net-private-001",
    "PublicNetworkId": "net-public-001",
    "EnableIpv6": true
}

Output Example

{
    "Response": {
        "InstanceIdSet": [
            "ins-abcd1234"
        ],
        "RequestId": "eac6b301-a322-493a-8e36-83b295459397"
    }
}

Example2 Batch create physical machine instances

Create 3 physical machine instances in batches.

Input Example

POST / HTTP/1.1
Host: edgezone.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateInstances
<Common request parameters>

{
    "Zone": "ap-guangzhou-1",
    "InstanceType": "BMS5.MEDIUM8",
    "ImageId": "img-centos-7.9",
    "InstanceName": "batch-instance",
    "InstanceCount": 3,
    "PrivateNetworkId": "net-private-001",
    "PublicNetworkId": "net-public-001"
}

Output Example

{
    "Response": {
        "InstanceIdSet": [
            "ins-abcd1234",
            "ins-efgh5678",
            "ins-ijkl9012"
        ],
        "RequestId": "b5d7b923-6a8c-4e2f-9f01-4e7e8d3c1a2b"
    }
}

Example3 Batch Create Physical Machine Instances (Partially Successful)

Create 3 physical machine instances in batches. Among them, 2 were successfully created, and 1 failed to create due to insufficient resources.

Input Example

POST / HTTP/1.1
Host: edgezone.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateInstances
<Common request parameters>

{
    "Zone": "ap-guangzhou-1",
    "InstanceType": "BMS5.MEDIUM8",
    "ImageId": "img-centos-7.9",
    "InstanceName": "batch-instance",
    "InstanceCount": 3,
    "PrivateNetworkId": "net-private-001",
    "PublicNetworkId": "net-public-001"
}

Output Example

{
    "Response": {
        "InstanceIdSet": [
            "ins-abcd1234",
            "ins-efgh5678"
        ],
        "FailedCount": 1,
        "RequestId": "c7e8f012-3a4b-5c6d-7e8f-9a0b1c2d3e4f"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

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

Error Code Description
FailedOperation Operation failed.
InvalidParameterValue Parameter value error.
LimitExceeded.InstanceQuota LimitExceeded.InstanceQuota
ResourceInsufficient Insufficient resources.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback