public static final class CreateForwardEntryRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
CreateForwardEntryRequest |
build() |
CreateForwardEntryRequest.Builder |
clientToken(String clientToken)
The client token that is used to ensure the idempotence of the request.
|
CreateForwardEntryRequest.Builder |
externalIp(String externalIp)
* The EIP that can be accessed over the Internet when you configure a DNAT entry for an Internet NAT gateway.
|
CreateForwardEntryRequest.Builder |
externalPort(String externalPort)
* The external port range that is used for port forwarding when you configure a DNAT entry for an Internet NAT gateway.
|
CreateForwardEntryRequest.Builder |
forwardEntryName(String forwardEntryName)
The name of the DNAT entry.
|
CreateForwardEntryRequest.Builder |
forwardTableId(String forwardTableId)
The ID of the DNAT table.
|
CreateForwardEntryRequest.Builder |
internalIp(String internalIp)
* The private IP address of the ECS instance that needs to communicate with the Internet when you configure a DNAT entry for an Internet NAT gateway.
|
CreateForwardEntryRequest.Builder |
internalPort(String internalPort)
* The internal port or port range that is used for port forwarding when you configure a DNAT entry for an Internet NAT gateway.
|
CreateForwardEntryRequest.Builder |
ipProtocol(String ipProtocol)
The protocol.
|
CreateForwardEntryRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateForwardEntryRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateForwardEntryRequest.Builder |
portBreak(Boolean portBreak)
Specifies whether to remove limits on the port range.
|
CreateForwardEntryRequest.Builder |
regionId(String regionId)
The region ID of the NAT gateway.
|
CreateForwardEntryRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateForwardEntryRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
public CreateForwardEntryRequest.Builder clientToken(String clientToken)
You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. > If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.
public CreateForwardEntryRequest.Builder externalIp(String externalIp)
* The NAT IP address that can be accessed by external networks when you configure a DNAT entry for a VPC NAT gateway.
public CreateForwardEntryRequest.Builder externalPort(String externalPort)
* Valid values: **1** to **65535**. * To specify a port range, separate the first port and the last port with a forward slash (/), for example, `10/20`. * If you set **ExternalPort** to a port range, you must also set **InternalPort** to a port range, and the number of ports specified by these parameters must be the same. For example, if you set **ExternalPort** to `10/20`, you can set **InternalPort** to `80/90`. * The port that can be accessed by external networks when you configure a DNAT entry for a VPC NAT gateway. Valid values: **1** to **65535**.
public CreateForwardEntryRequest.Builder forwardEntryName(String forwardEntryName)
The name must be 2 to 128 characters in length. It must start with a letter but cannot start with `http://` or `https://`.
public CreateForwardEntryRequest.Builder forwardTableId(String forwardTableId)
public CreateForwardEntryRequest.Builder internalIp(String internalIp)
* It must belong to the CIDR block of the VPC where the NAT gateway is deployed. * The DNAT entry takes effect only if the private IP address is assigned to an ECS instance and the ECS instance is not associated with an EIP. * The private IP address that uses DNAT when you add a DNAT entry to a VPC NAT gateway.
public CreateForwardEntryRequest.Builder internalPort(String internalPort)
* The port of the destination ECS instance to be mapped when you configure a DNAT entry for a VPC NAT gateway. Valid values: **1** to **65535**.
public CreateForwardEntryRequest.Builder ipProtocol(String ipProtocol)
* **TCP** * **UDP** * **Any** If you set **IpProtocol** to **Any**, you must also set **ExternalPort** and **InternalPort** to **Any** to implement DNAT IP mapping.
public CreateForwardEntryRequest.Builder ownerAccount(String ownerAccount)
public CreateForwardEntryRequest.Builder ownerId(Long ownerId)
public CreateForwardEntryRequest.Builder portBreak(Boolean portBreak)
* **true** * **false** (default) > If a DNAT entry and an SNAT entry have the same public IP address, ou must specify a port that is larger that 1024, and set **PortBreak** to **true**.
public CreateForwardEntryRequest.Builder regionId(String regionId)
You can call the [DescribeRegions](~~36063~~) operation to obtain the region ID.
public CreateForwardEntryRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateForwardEntryRequest.Builder resourceOwnerId(Long resourceOwnerId)
public CreateForwardEntryRequest build()
Copyright © 2024. All rights reserved.