public static final class CreateNatGatewayRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
CreateNatGatewayRequest.Builder |
autoPay(Boolean autoPay)
Subscription Internet NAT gateways are no longer available for purchase.
|
CreateNatGatewayRequest |
build() |
CreateNatGatewayRequest.Builder |
clientToken(String clientToken)
The client token that is used to ensure the idempotence of the request.
|
CreateNatGatewayRequest.Builder |
description(String description)
The description of the NAT gateway.
|
CreateNatGatewayRequest.Builder |
duration(String duration)
Subscription Internet NAT gateways are no longer available for purchase.
|
CreateNatGatewayRequest.Builder |
eipBindMode(String eipBindMode)
The mode in which the EIP is associated with the NAT gateway.
|
CreateNatGatewayRequest.Builder |
icmpReplyEnabled(Boolean icmpReplyEnabled)
Specifies whether to enable ICMP retrieval.
|
CreateNatGatewayRequest.Builder |
instanceChargeType(String instanceChargeType)
The billing method of the NAT gateway.
|
CreateNatGatewayRequest.Builder |
internetChargeType(String internetChargeType)
The metering method of the NAT gateway.
|
CreateNatGatewayRequest.Builder |
name(String name)
The name of the NAT gateway.
|
CreateNatGatewayRequest.Builder |
natType(String natType)
The type of NAT gateway.
|
CreateNatGatewayRequest.Builder |
networkType(String networkType)
The network type of the NAT gateway.
|
CreateNatGatewayRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateNatGatewayRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateNatGatewayRequest.Builder |
pricingCycle(String pricingCycle)
Subscription Internet NAT gateways are no longer available for purchase.
|
CreateNatGatewayRequest.Builder |
regionId(String regionId)
The region ID of the NAT gateway.
|
CreateNatGatewayRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateNatGatewayRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
CreateNatGatewayRequest.Builder |
securityProtectionEnabled(Boolean securityProtectionEnabled)
Specifies whether to enable the firewall feature.
|
CreateNatGatewayRequest.Builder |
spec(String spec)
Subscription Internet NAT gateways are no longer available for purchase.
|
CreateNatGatewayRequest.Builder |
tag(List<CreateNatGatewayRequest.Tag> tag)
The tags.
|
CreateNatGatewayRequest.Builder |
vpcId(String vpcId)
The ID of the VPC where you want to create the NAT gateway.
|
CreateNatGatewayRequest.Builder |
vSwitchId(String vSwitchId)
The ID of the vSwitch to which the NAT gateway is attached.
|
public CreateNatGatewayRequest.Builder autoPay(Boolean autoPay)
public CreateNatGatewayRequest.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. > 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 CreateNatGatewayRequest.Builder description(String description)
You can leave this parameter empty or enter a description. If you enter a description, the description must be 2 to 256 characters in length and cannot start with `http://` or `https://`.
public CreateNatGatewayRequest.Builder duration(String duration)
public CreateNatGatewayRequest.Builder eipBindMode(String eipBindMode)
* **MULTI_BINDED** (default): Multi-EIP-to-ENI mode. * **NAT**: NAT mode. IPv4 gateways are supported in this mode. ** **Note** If a NAT gateway is associated with an EIP in NAT mode, the EIP occupies one private IP address in the vSwitch. Make sure that the vSwitch has sufficient private IP addresses. Otherwise, the NAT gateway fails to be associated with the EIP. In NAT mode, a maximum number of 50 EIPs can be associated with each NAT gateway.
public CreateNatGatewayRequest.Builder icmpReplyEnabled(Boolean icmpReplyEnabled)
* **true** (default) * **false**
public CreateNatGatewayRequest.Builder instanceChargeType(String instanceChargeType)
Set the value to **PostPaid** (pay-as-you-go), which is the default value. For more information, see [Internet NAT gateway billing](~~48126~~) and [VPC NAT gateway billing](~~270913~~).
public CreateNatGatewayRequest.Builder internetChargeType(String internetChargeType)
public CreateNatGatewayRequest.Builder name(String name)
The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (\_), and hyphens (-). The name must start with a letter. If this parameter is not set, the system assigns a default name to the NAT gateway.
public CreateNatGatewayRequest.Builder natType(String natType)
public CreateNatGatewayRequest.Builder networkType(String networkType)
* **internet**: Internet * **intranet**: VPC
public CreateNatGatewayRequest.Builder ownerAccount(String ownerAccount)
public CreateNatGatewayRequest.Builder ownerId(Long ownerId)
public CreateNatGatewayRequest.Builder pricingCycle(String pricingCycle)
public CreateNatGatewayRequest.Builder regionId(String regionId)
You can call the [DescribeRegions](~~36063~~) operation to obtain the region ID.
public CreateNatGatewayRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateNatGatewayRequest.Builder resourceOwnerId(Long resourceOwnerId)
public CreateNatGatewayRequest.Builder securityProtectionEnabled(Boolean securityProtectionEnabled)
* **false** (default)>
public CreateNatGatewayRequest.Builder spec(String spec)
public CreateNatGatewayRequest.Builder tag(List<CreateNatGatewayRequest.Tag> tag)
public CreateNatGatewayRequest.Builder vSwitchId(String vSwitchId)
When you create a NAT gateway, you must specify a vSwitch for the NAT gateway. Then, the system assigns an idle private IP address from the vSwitch to the NAT gateway. * To attach the NAT gateway to an existing vSwitch, make sure that the zone to which the vSwitch belongs supports NAT gateways. In addition, the vSwitch must have idle IP addresses. * If no vSwitch exists in the VPC, create a vSwitch in a zone that supports NAT gateways. Then, specify the vSwitch for the NAT gateway. > You can call the [ListEnhanhcedNatGatewayAvailableZones](~~182292~~) operation to query zones that support NAT gateways. You can call the [DescribeVSwitches](~~35748~~) operation to query idle IP addresses in a vSwitch.
public CreateNatGatewayRequest.Builder vpcId(String vpcId)
public CreateNatGatewayRequest build()
Copyright © 2024. All rights reserved.