public static final class CreateSnatEntryRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
CreateSnatEntryRequest |
build() |
CreateSnatEntryRequest.Builder |
clientToken(String clientToken)
The client token that is used to ensure the idempotence of the request.
|
CreateSnatEntryRequest.Builder |
eipAffinity(Integer eipAffinity)
Specifies whether to enable EIP affinity.
|
CreateSnatEntryRequest.Builder |
networkInterfaceId(String networkInterfaceId)
NetworkInterfaceId.
|
CreateSnatEntryRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateSnatEntryRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateSnatEntryRequest.Builder |
regionId(String regionId)
The region ID of the NAT gateway.
|
CreateSnatEntryRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateSnatEntryRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
CreateSnatEntryRequest.Builder |
snatEntryName(String snatEntryName)
The name of the SNAT entry.
|
CreateSnatEntryRequest.Builder |
snatIp(String snatIp)
* The EIPs in the SNAT entry when you add an SNAT entry to an Internet NAT gateway.
|
CreateSnatEntryRequest.Builder |
snatTableId(String snatTableId)
The ID of the SNAT table.
|
CreateSnatEntryRequest.Builder |
sourceCIDR(String sourceCIDR)
You can specify the CIDR block of a VPC, a vSwitch, or an ECS instance or enter a custom CIDR block.
|
CreateSnatEntryRequest.Builder |
sourceVSwitchId(String sourceVSwitchId)
The ID of the vSwitch.
|
public CreateSnatEntryRequest.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 `client token` can contain only ASCII characters. ** **Description** 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 CreateSnatEntryRequest.Builder eipAffinity(Integer eipAffinity)
* **0**: no * **1**: yes ** **Description** After you enable EIP affinity, if multiple EIPs are associated with an SNAT entry, each client uses one EIP to access the Internet. If EIP affinity is disabled, each client uses a random EIP to access the Internet.
public CreateSnatEntryRequest.Builder networkInterfaceId(String networkInterfaceId)
public CreateSnatEntryRequest.Builder ownerAccount(String ownerAccount)
public CreateSnatEntryRequest.Builder ownerId(Long ownerId)
public CreateSnatEntryRequest.Builder regionId(String regionId)
You can call the [DescribeRegions](~~36063~~) operation to query the most recent region list. Valid values: * ap-northeast-2-pop : ap-northeast-2-pop .
public CreateSnatEntryRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateSnatEntryRequest.Builder resourceOwnerId(Long resourceOwnerId)
public CreateSnatEntryRequest.Builder snatEntryName(String snatEntryName)
The name must be 2 to 128 characters in length. It must start with a letter but cannot start with `http://` or `https://`.
public CreateSnatEntryRequest.Builder snatIp(String snatIp)
> If you specify multiple EIPs in the SNAT IP address pool, the service connection is allocated to multiple EIPs by using the hashing algorithm. The traffic of each EIP may be different. Therefore, we recommend that you associate the EIPs with an Internet Shared Bandwidth instance to prevent service interruptions caused by bandwidth exhaustion. * When you add SNAT entries for a VPC NAT gateway, this parameter specifies the NAT IP addresses in the SNAT entry. Separate multiple NAT IP addresses with commas (,).
public CreateSnatEntryRequest.Builder snatTableId(String snatTableId)
public CreateSnatEntryRequest.Builder sourceCIDR(String sourceCIDR)
You can specify an SNAT entry in the following ways: * You can specify the CIDR block of the VPC where the NAT gateway is deployed. Then, all ECS instances in the VPC can access the Internet or external networks by using SNAT. * You can specify the CIDR block of a vSwitch, for example, 192.168.1.0/24. Then, the ECS instances in the vSwitch can access the Internet or external networks by using SNAT. * You can specify the IP address of an ECS instance, for example, 192.168.1.1/32. Then, the ECS instance can access the Internet or external networks by using SNAT. * You can specify a custom CIDR block. Then, all ECS instances within the specified CIDR block can access the Internet or external networks by using SNAT. When you add an SNAT entry to an Internet NAT gateway, if **SnatIp** is set to an EIP, the ECS instance uses the specified EIP to access the Internet. If **SnatIp** is set to multiple EIPs, the ECS instance randomly selects an EIP specified in the **SnatIp** parameter to access the Internet. You cannot specify this parameter and **SourceVSwtichId** at the same time. If **SourceVSwitchId** is specified, you cannot specify **SourceCIDR**. If **SourceCIDR** is specified, you cannot specify **SourceVSwitchId**.
public CreateSnatEntryRequest.Builder sourceVSwitchId(String sourceVSwitchId)
* When you add an SNAT entry to an Internet NAT gateway, this parameter specifies that ECS instances in the vSwitch can use the SNAT entry to access the Internet. If you select multiple elastic IP addresses (EIPs) to create an SNAT address pool, connections are hashed to these EIPs. Network traffic may not be evenly distributed to the EIPs because the amount of traffic that passes through each connection varies. We recommend that you associate these EIPs with the same EIP bandwidth plan to prevent service interruptions due to the bandwidth limits on individual EIPs. * When you add an SNAT entry to a VPC NAT gateway, this parameter specifies that ECS instances in the vSwitch can use the SNAT entry to access external networks.
public CreateSnatEntryRequest build()
Copyright © 2024. All rights reserved.