tencent cloud

APIs

ApplyPublicIps

Mode fokus
Ukuran font
Terakhir diperbarui: 2026-04-27 16:54:57

1. API Description

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

This API is used to submit a request for multiple IP addresses from the static IP pool to specify a public network instance (random allocation). Need to check user quota before applying.
This API is applicable only to public network instances with RouteMode=static. Calling this API for BGP/OSPF instances will return an error.

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: ApplyPublicIps.
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.
NetworkInstanceId Yes String Public network instance ID (route publishing mode must be STATIC)
Count Yes Integer Apply for an Ip quantity, minimum is 1
Type Yes String Applied Ip type, enumeration value: ipv4, ipv6

3. Output Parameters

Parameter Name Type Description
IpList Array of String Assigned public network IP address list.
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 Applying for a Public Ipv4

Input Example

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

{
    "NetworkInstanceId": "epn-dfghjkl",
    "Type": "ipv4",
    "Count": 1
}

Output Example

{
    "Response": {
        "RequestId": "test-req-021",
        "IpList": [
            "224.12.10.25"
        ]
    }
}

Example2 Apply for a public Ipv6

Input Example

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

{
    "NetworkInstanceId": "epn-xxxxxxxx",
    "Type": "ipv6",
    "Count": 1
}

Output Example

{
    "Response": {
        "RequestId": "test-req-021",
        "IpList": [
            "2001:db8::1"
        ]
    }
}

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.NotSupportedForDynamicInstance The instance is in BGP/OSPF mode, with IPs automatically assigned or released by the system. No application is required to assign or release IPs.
InternalError Internal error.
InvalidParameter Parameter error.
LimitExceeded.Ipv6QuotaExceeded The number of Ipv6 addresses applied for exceeds the quota limit.
LimitExceeded.Ipv6QuotaNotConfigured The user has no configuration for IPv6 quota in the availability zone (Type=ipv6).
LimitExceeded.QuotaExceeded The number of Ipv4 addresses applied for exceeds the quota limit.
LimitExceeded.QuotaNotConfigured BGP/OSPF mode: The user has no IPv4 quota configuration in this availability zone.
ResourceInsufficient.PublicIpInsufficient Insufficient remaining IPv4 addresses
ResourceInsufficient.PublicIpv6Insufficient Insufficient remaining IPv6 addresses

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan