CreateProxy

Last updated: 2021-07-09 19:08:23

1. API Description

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

This API (CreateProxy) is used to create an acceleration connection with specified configuration.

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 parameter. The value used for this API: CreateProxy.
Version Yes String Common parameter. The value used for this API: 2018-05-29.
Region No String Common parameter. This parameter is not required for this API.
ProjectId Yes Integer Project ID of connection.
ProxyName Yes String Connection name.
AccessRegion Yes String Access region.
Bandwidth Yes Integer Connection bandwidth cap. Unit: Mbps.
Concurrent Yes Integer Connection concurrence cap, which indicates the maximum number of simultaneous online connections. Unit: 10,000 connections.
RealServerRegion No String Origin server region. If GroupId exists, the origin server region is the one of connection group, and this field is not required. If GroupId does not exist, this field is reuqired.
ClientToken No String A string used to ensure the idempotency of the request, which is generated by the user and must be unique to each request. The maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
For more information, please see How to Ensure Idempotence.
GroupId No String Connection group ID. This parameter is required when the connection is created in the connection group. Otherwise, this field is ignored.
TagSet.N No Array of TagPair List of tags to be added for connection.
ClonedProxyId No String ID of the replicated connection. Only a running connection can be replicated.
The connection is to be replicated if this parameter is set.
BillingType No Integer Billing mode (0: bill-by-bandwidth, 1: bill-by-traffic. Default value: bill-by-bandwidth)
IPAddressVersion No String IP version. Valid values: IPv4 (default), IPv6.

3. Output Parameters

Parameter Name Type Description
InstanceId String Instance ID of connection.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Creating connection

Input Example

https://gaap.tencentcloudapi.com/?Action=CreateProxy
&ProjectId=0
&ProxyName=test
&AccessRegion=SouthChina
&Bandwidth=10
&Concurrent=2
&GroupId=lg-xxxx
&<Common request parameters>

Output Example

{
  "Response": {
    "InstanceId": "link-11112222",
    "RequestId": "c7bfcad5-3f20-472f-9afc-13a66faebad8"
  }
}

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.
FailedOperation.AccountBalanceInsufficient Unable to create this connection: insufficient account balance.
FailedOperation.DuplicatedRequest Repeated request. Please check the value of ClientToken.
FailedOperation.LimitNumofListener Limit on the number of listeners exceeded.
FailedOperation.ProxySellOut The line is sold out or the resource is insufficient. Please submit a ticket.
FailedOperation.UserNotAuthenticated Unverified user.
InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameterValue Incorrect parameter value.
InvalidParameterValue.InvalidBandwidth The bandwidth value is not in the range.
InvalidParameterValue.InvalidConcurrency The number of concurrences is not in the range.
InvalidParameterValue.InvalidTags The tag is not found or you have no access permission to it.
InvalidParameterValue.ProjectIdNotBelong The project does not belong to this user.
MissingParameter Missing parameter.
ResourceNotFound The resource does not exist.
ResourceUnavailable The resource is unavailable.
UnauthorizedOperation Unauthorized operation.
UnknownParameter Unknown parameter.