tencent cloud

文档反馈

ApplyInternetAddress

最后更新时间:2022-10-18 10:39:14

1. API Description

Domain name for API request: dc.tencentcloudapi.com.

This API is used to apply for an internet tunnel’s CIDR block.

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: ApplyInternetAddress.
Version Yes String Common Params. The value used for this API: 2018-04-10.
Region No String Common Params. This parameter is not required for this API.
MaskLen Yes Integer Mask length of a CIDR block
AddrType Yes Integer Address type. Valid values: 0: BGP
1: China Telecom
2: China Mobile
3: China Unicom
AddrProto Yes Integer Address protocol. Valid values: 0: IPv4
1: IPv6

3. Output Parameters

Parameter Name Type Description
InstanceId String ID of the internet tunnel’s public IP address
Note: this field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Applying for a BGP IPv4 address

Input Example

https://dc.tencentcloudapi.com/?Action=ApplyInternetAddress
&AddrType=0
&AddrProto=0
&MaskLen=30
&<Common request parameters>

Output Example

{
    "Response": {
        "InstanceId": "ipv4-h2k2jna1",
        "RequestId": "24a0d7e5-4c13-49be-aa16-94f698fbef3e"
    }
}

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
LimitExceeded The quota limit is exceeded.