tencent cloud

Feedback

CreateForwardRule

Last updated: 2024-11-07 18:47:14

1. API Description

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

This API is used to create a custom forwarding rule.

A maximum of 5 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: CreateForwardRule.
Version Yes String Common Params. The value used for this API: 2020-10-28.
Region No String Common Params. This parameter is not required for this API.
RuleName Yes String Forwarding rule name.
RuleType Yes String Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
ZoneId Yes String Private domain ID, which can be viewed on the private domain list page.
EndPointId Yes String Endpoint ID.

3. Output Parameters

Parameter Name Type Description
RuleId String Forwarding rule ID.
RuleName String Forwarding rule name.
RuleType String Forwarding rule type.
ZoneId String Private domain ID.
EndPointId String Endpoint 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 Forwarding Rule

Input Example

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

{
    "RuleType": "UP",
    "ZoneId": "zone-fadsvas",
    "RuleName": "Rule 1.",
    "EndPointId": "eid-93kvksadf"
}

Output Example

{
    "Response": {
        "RequestId": "5cd964e2-b5e6-8a35-9ce5a1085860c845",
        "RuleType": "UP",
        "RuleId": "fid-afdfaf2fsad",
        "ZoneId": "zone-fadsvas",
        "EndPointId": "eid-93kvksadf",
        "RuleName": "Rule 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
AuthFailure Error with CAM signature/authentication.
DryRunOperation DryRun Operation. It means that the request would have succeeded, but the DryRun parameter was used.
FailedOperation Operation failed.
InternalError Internal error.
InternalError.UndefiendError Undefined error.
InvalidParameter Incorrect parameter.
InvalidParameter.EndPointNotExists The endpoint does not exist.
InvalidParameter.ForwardRuleZoneRepeatBind The private domain has already been bound with the forwarding rule.
InvalidParameter.ZoneNotExists The domain does not exist.
InvalidParameterValue Incorrect parameter value.
UnknownParameter Unknown parameter.
UnsupportedOperation Unsupported operation.
UnsupportedOperation.FrequencyLimit The API call frequency exceeds the limit.