All Products
Search
Document Center

Anti-DDoS:CreatePort

Last Updated:Mar 25, 2026

Creates a port forwarding rule.

Operation description

This operation supports integration with Terraform. For more information about Terraform, see What is Terraform?.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

FrontendPort

string

Yes

The frontend port. Valid values: 0 to 65535.

55

FrontendProtocol

string

Yes

The forwarding protocol. Valid values:

  • tcp: TCP

  • udp: UDP

tcp

InstanceId

string

Yes

The ID of the Anti-DDoS Pro instance for the port forwarding rule.

Note

Call DescribeInstanceIds to query the IDs of all your Anti-DDoS Pro instances.

ddoscoo-cn-st21zbyq****

BackendPort

string

No

The backend port. Valid values: 0 to 65535.

55

RealServers

array

Yes

A list of real server IP addresses.

string

No

A real server IP address.

1.XX.XX.1

ProxyEnable

integer

No

The proxy switch. Valid values:

  • 0: Disabled.

  • 1: Enabled.

0

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

4787A9A6-8230-4B4A-8211-AFBF7C416B4D

Examples

Success response

JSON format

{
  "RequestId": "4787A9A6-8230-4B4A-8211-AFBF7C416B4D"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.