tencent cloud

Feedback

CreateApplicationProxy

Last updated: 2023-03-09 17:41:49

1. API Description

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

This API is used to create an application proxy.

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: CreateApplicationProxy.
Version Yes String Common Params. The value used for this API: 2022-01-06.
Region No String Common Params. This parameter is not required for this API.
ZoneId Yes String Site ID
ZoneName Yes String Site name
ProxyName Yes String Name of the proxy:
Domain name or subdomain name when ProxyType=hostname
Instance name when ProxyType=instance
PlatType Yes String Scheduling mode. Values:
ip: Anycast IP
domain: CNAME
SecurityType Yes Integer 0: Disable security protection; 1: Enable security protection.
AccelerateType Yes Integer 0: Disable acceleration; 1: Enable acceleration.
ForwardClientIp Yes String This field is moved to Rule.ForwardClientIp.
SessionPersist Yes Boolean This field is moved to Rule.SessionPersist.
Rule.N Yes Array of ApplicationProxyRule Rule details
SessionPersistTime No Integer Session persistence duration. Value range: 30-3600 (in seconds).
ProxyType No String Specifies how a layer-4 proxy is created.
hostname: Create by subdomain name
instance: Create by instance

3. Output Parameters

Parameter Name Type Description
ProxyId String Layer-4 application proxy ID
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Creating an application proxy

Input Example

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

{
    "ZoneId": "zone-id123",
    "ZoneName": "zonename-123",
    "ProxyName": "ins name",
    "ProxyType": "instance",
    "PlatType": "ip",
    "SecurityType": 1,
    "AccelerateType": 1,
    "ForwardClientIp": "",
    "SessionPersist": false,
    "SessionPersistTime": 3600,
    "Rule": [
        {
            "Proto": "TCP",
            "Port": [
                "80",
                "90",
                "99-110"
            ],
            "OriginType": "custom",
            "OriginValue": [
                "1.1.1.1:80"
            ]
        },
        {
            "Proto": "UDP",
            "Port": [
                "999",
                "888",
                "99-110"
            ],
            "OriginType": "custom",
            "OriginValue": [
                "1.1.1.1:80",
                "2.2.2.2:80"
            ]
        }
    ]
}

Output Example

{
    "Response": {
        "RequestId": "xx",
        "ProxyId": "proxy-xxx"
    }
}

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
InvalidParameter.ParameterError Parameter error.
LimitExceeded The quota limit has been reached.
OperationDenied Operation denied.
ResourceInsufficient Insufficient resource.
ResourceNotFound The resource doesn’t exist.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support