tencent cloud

APIs

DocumentationAPIsEdge ZoneNetwork APIsCreatePrivateNetworkInstance

CreatePrivateNetworkInstance

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

1. API Description

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

Create a private network instance. A user can only create one private network instance in an availability zone. The subnet range is collectively determined by both parameters: Network (network number) and Mask (bit number of the mask). Network must be a valid network address from one of the three RFC 1918 private address ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16, and all host bits must be 0 (meaning the combination of Network and Mask cannot have any host bits set, such as 10.0.0.1/24 is illegal, use 10.0.0.0/24 instead). The maximum Mask is unified as 28, and the minimum is determined by the address range it belongs to: 10.x.x.x allows 8–28, 172.16.x.x allows 12–28, and 192.168.x.x allows 16–28.

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: CreatePrivateNetworkInstance.
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.
NetworkInstanceName Yes String New instance name
ZoneId Yes String Availability zone ID.
Network Yes String The network address (host bits must be all 0s) must fall into one of the following RFC 1918 private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
Mask Yes Integer Mask digits. The upper limit is fixed at 28, while the lower limit depends on the private segment it belongs to: 10.0.0.0/8 allows 8~28, 172.16.0.0/12 allows 12~28, 192.168.0.0/16 allows 16~28. It must together form a valid network address with Network (host bits all set to 0).

3. Output Parameters

Parameter Name Type Description
NetworkInstanceId String Private network instance ID
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 Creating a private network instance

Input Example

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

{
    "NetworkInstanceName": "test-pri-instance",
    "ZoneId": "ap-beijing",
    "Network": "10.0.0.0",
    "Mask": 24
}

Output Example

{
    "Response": {
        "RequestId": "test-req-011",
        "NetworkInstanceId": "ein-a1b2c3d4"
    }
}

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.PrivateInstanceDuplicate A private network instance with this AppId already exists in the specified availability zone.
InternalError Internal error.
InvalidParameter Parameter error.
InvalidParameterValue.InvalidNetwork Invalid subnet address format

Help and Support

Was this page helpful?

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

Feedback