Class ComputeRouterNatConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_router_nat.ComputeRouterNatConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeRouterNatConfig>
- Enclosing interface:
- ComputeRouterNatConfig
@Stability(Stable) public static final class ComputeRouterNatConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeRouterNatConfig>
A builder forComputeRouterNatConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public ComputeRouterNatConfig.Builder name(String name)
Sets the value ofComputeRouterNatConfig.getName()- Parameters:
name- Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#name ComputeRouterNat#name}- Returns:
this
-
router
@Stability(Stable) public ComputeRouterNatConfig.Builder router(String router)
Sets the value ofComputeRouterNatConfig.getRouter()- Parameters:
router- The name of the Cloud Router in which this NAT will be configured. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#router ComputeRouterNat#router}- Returns:
this
-
sourceSubnetworkIpRangesToNat
@Stability(Stable) public ComputeRouterNatConfig.Builder sourceSubnetworkIpRangesToNat(String sourceSubnetworkIpRangesToNat)
Sets the value ofComputeRouterNatConfig.getSourceSubnetworkIpRangesToNat()- Parameters:
sourceSubnetworkIpRangesToNat- How NAT should be configured per Subnetwork. This parameter is required. If 'ALL_SUBNETWORKS_ALL_IP_RANGES', all of the IP ranges in every Subnetwork are allowed to Nat. If 'ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES', all of the primary IP ranges in every Subnetwork are allowed to Nat. 'LIST_OF_SUBNETWORKS': A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region. Possible values: ["ALL_SUBNETWORKS_ALL_IP_RANGES", "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", "LIST_OF_SUBNETWORKS"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#source_subnetwork_ip_ranges_to_nat ComputeRouterNat#source_subnetwork_ip_ranges_to_nat}- Returns:
this
-
autoNetworkTier
@Stability(Stable) public ComputeRouterNatConfig.Builder autoNetworkTier(String autoNetworkTier)
Sets the value ofComputeRouterNatConfig.getAutoNetworkTier()- Parameters:
autoNetworkTier- The network tier to use when automatically reserving NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, then the current project-level default tier is used. Possible values: ["PREMIUM", "STANDARD"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#auto_network_tier ComputeRouterNat#auto_network_tier}- Returns:
this
-
drainNatIps
@Stability(Stable) public ComputeRouterNatConfig.Builder drainNatIps(List<String> drainNatIps)
Sets the value ofComputeRouterNatConfig.getDrainNatIps()- Parameters:
drainNatIps- A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#drain_nat_ips ComputeRouterNat#drain_nat_ips}- Returns:
this
-
enableDynamicPortAllocation
@Stability(Stable) public ComputeRouterNatConfig.Builder enableDynamicPortAllocation(Boolean enableDynamicPortAllocation)
Sets the value ofComputeRouterNatConfig.getEnableDynamicPortAllocation()- Parameters:
enableDynamicPortAllocation- Enable Dynamic Port Allocation. If minPortsPerVm is set, minPortsPerVm must be set to a power of two greater than or equal to 32. If minPortsPerVm is not set, a minimum of 32 ports will be allocated to a VM from this NAT config. If maxPortsPerVm is set, maxPortsPerVm must be set to a power of two greater than minPortsPerVm. If maxPortsPerVm is not set, a maximum of 65536 ports will be allocated to a VM from this NAT config. Mutually exclusive with enableEndpointIndependentMapping. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#enable_dynamic_port_allocation ComputeRouterNat#enable_dynamic_port_allocation}- Returns:
this
-
enableDynamicPortAllocation
@Stability(Stable) public ComputeRouterNatConfig.Builder enableDynamicPortAllocation(com.hashicorp.cdktf.IResolvable enableDynamicPortAllocation)
Sets the value ofComputeRouterNatConfig.getEnableDynamicPortAllocation()- Parameters:
enableDynamicPortAllocation- Enable Dynamic Port Allocation. If minPortsPerVm is set, minPortsPerVm must be set to a power of two greater than or equal to 32. If minPortsPerVm is not set, a minimum of 32 ports will be allocated to a VM from this NAT config. If maxPortsPerVm is set, maxPortsPerVm must be set to a power of two greater than minPortsPerVm. If maxPortsPerVm is not set, a maximum of 65536 ports will be allocated to a VM from this NAT config. Mutually exclusive with enableEndpointIndependentMapping. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#enable_dynamic_port_allocation ComputeRouterNat#enable_dynamic_port_allocation}- Returns:
this
-
enableEndpointIndependentMapping
@Stability(Stable) public ComputeRouterNatConfig.Builder enableEndpointIndependentMapping(Boolean enableEndpointIndependentMapping)
Sets the value ofComputeRouterNatConfig.getEnableEndpointIndependentMapping()- Parameters:
enableEndpointIndependentMapping- Enable endpoint independent mapping. For more information see the official documentation. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#enable_endpoint_independent_mapping ComputeRouterNat#enable_endpoint_independent_mapping}- Returns:
this
-
enableEndpointIndependentMapping
@Stability(Stable) public ComputeRouterNatConfig.Builder enableEndpointIndependentMapping(com.hashicorp.cdktf.IResolvable enableEndpointIndependentMapping)
Sets the value ofComputeRouterNatConfig.getEnableEndpointIndependentMapping()- Parameters:
enableEndpointIndependentMapping- Enable endpoint independent mapping. For more information see the official documentation. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#enable_endpoint_independent_mapping ComputeRouterNat#enable_endpoint_independent_mapping}- Returns:
this
-
endpointTypes
@Stability(Stable) public ComputeRouterNatConfig.Builder endpointTypes(List<String> endpointTypes)
Sets the value ofComputeRouterNatConfig.getEndpointTypes()- Parameters:
endpointTypes- Specifies the endpoint Types supported by the NAT Gateway. Supported values include: 'ENDPOINT_TYPE_VM', 'ENDPOINT_TYPE_SWG', 'ENDPOINT_TYPE_MANAGED_PROXY_LB'. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#endpoint_types ComputeRouterNat#endpoint_types}- Returns:
this
-
icmpIdleTimeoutSec
@Stability(Stable) public ComputeRouterNatConfig.Builder icmpIdleTimeoutSec(Number icmpIdleTimeoutSec)
Sets the value ofComputeRouterNatConfig.getIcmpIdleTimeoutSec()- Parameters:
icmpIdleTimeoutSec- Timeout (in seconds) for ICMP connections. Defaults to 30s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#icmp_idle_timeout_sec ComputeRouterNat#icmp_idle_timeout_sec}- Returns:
this
-
id
@Stability(Stable) public ComputeRouterNatConfig.Builder id(String id)
Sets the value ofComputeRouterNatConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#id ComputeRouterNat#id}. Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.- Returns:
this
-
logConfig
@Stability(Stable) public ComputeRouterNatConfig.Builder logConfig(ComputeRouterNatLogConfig logConfig)
Sets the value ofComputeRouterNatConfig.getLogConfig()- Parameters:
logConfig- log_config block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#log_config ComputeRouterNat#log_config}- Returns:
this
-
maxPortsPerVm
@Stability(Stable) public ComputeRouterNatConfig.Builder maxPortsPerVm(Number maxPortsPerVm)
Sets the value ofComputeRouterNatConfig.getMaxPortsPerVm()- Parameters:
maxPortsPerVm- Maximum number of ports allocated to a VM from this NAT. This field can only be set when enableDynamicPortAllocation is enabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#max_ports_per_vm ComputeRouterNat#max_ports_per_vm}- Returns:
this
-
minPortsPerVm
@Stability(Stable) public ComputeRouterNatConfig.Builder minPortsPerVm(Number minPortsPerVm)
Sets the value ofComputeRouterNatConfig.getMinPortsPerVm()- Parameters:
minPortsPerVm- Minimum number of ports allocated to a VM from this NAT. Defaults to 64 for static port allocation and 32 dynamic port allocation if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#min_ports_per_vm ComputeRouterNat#min_ports_per_vm}- Returns:
this
-
natIpAllocateOption
@Stability(Stable) public ComputeRouterNatConfig.Builder natIpAllocateOption(String natIpAllocateOption)
Sets the value ofComputeRouterNatConfig.getNatIpAllocateOption()- Parameters:
natIpAllocateOption- How external IPs should be allocated for this NAT. Valid values are 'AUTO_ONLY' for only allowing NAT IPs allocated by Google Cloud Platform, or 'MANUAL_ONLY' for only user-allocated NAT IP addresses. Possible values: ["MANUAL_ONLY", "AUTO_ONLY"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#nat_ip_allocate_option ComputeRouterNat#nat_ip_allocate_option}- Returns:
this
-
natIps
@Stability(Stable) public ComputeRouterNatConfig.Builder natIps(List<String> natIps)
Sets the value ofComputeRouterNatConfig.getNatIps()- Parameters:
natIps- Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#nat_ips ComputeRouterNat#nat_ips}- Returns:
this
-
project
@Stability(Stable) public ComputeRouterNatConfig.Builder project(String project)
Sets the value ofComputeRouterNatConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#project ComputeRouterNat#project}.- Returns:
this
-
region
@Stability(Stable) public ComputeRouterNatConfig.Builder region(String region)
Sets the value ofComputeRouterNatConfig.getRegion()- Parameters:
region- Region where the router and NAT reside. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#region ComputeRouterNat#region}- Returns:
this
-
rules
@Stability(Stable) public ComputeRouterNatConfig.Builder rules(com.hashicorp.cdktf.IResolvable rules)
Sets the value ofComputeRouterNatConfig.getRules()- Parameters:
rules- rules block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#rules ComputeRouterNat#rules}- Returns:
this
-
rules
@Stability(Stable) public ComputeRouterNatConfig.Builder rules(List<? extends ComputeRouterNatRules> rules)
Sets the value ofComputeRouterNatConfig.getRules()- Parameters:
rules- rules block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#rules ComputeRouterNat#rules}- Returns:
this
-
subnetwork
@Stability(Stable) public ComputeRouterNatConfig.Builder subnetwork(com.hashicorp.cdktf.IResolvable subnetwork)
Sets the value ofComputeRouterNatConfig.getSubnetwork()- Parameters:
subnetwork- subnetwork block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#subnetwork ComputeRouterNat#subnetwork}- Returns:
this
-
subnetwork
@Stability(Stable) public ComputeRouterNatConfig.Builder subnetwork(List<? extends ComputeRouterNatSubnetwork> subnetwork)
Sets the value ofComputeRouterNatConfig.getSubnetwork()- Parameters:
subnetwork- subnetwork block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#subnetwork ComputeRouterNat#subnetwork}- Returns:
this
-
tcpEstablishedIdleTimeoutSec
@Stability(Stable) public ComputeRouterNatConfig.Builder tcpEstablishedIdleTimeoutSec(Number tcpEstablishedIdleTimeoutSec)
Sets the value ofComputeRouterNatConfig.getTcpEstablishedIdleTimeoutSec()- Parameters:
tcpEstablishedIdleTimeoutSec- Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#tcp_established_idle_timeout_sec ComputeRouterNat#tcp_established_idle_timeout_sec}- Returns:
this
-
tcpTimeWaitTimeoutSec
@Stability(Stable) public ComputeRouterNatConfig.Builder tcpTimeWaitTimeoutSec(Number tcpTimeWaitTimeoutSec)
Sets the value ofComputeRouterNatConfig.getTcpTimeWaitTimeoutSec()- Parameters:
tcpTimeWaitTimeoutSec- Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#tcp_time_wait_timeout_sec ComputeRouterNat#tcp_time_wait_timeout_sec}- Returns:
this
-
tcpTransitoryIdleTimeoutSec
@Stability(Stable) public ComputeRouterNatConfig.Builder tcpTransitoryIdleTimeoutSec(Number tcpTransitoryIdleTimeoutSec)
Sets the value ofComputeRouterNatConfig.getTcpTransitoryIdleTimeoutSec()- Parameters:
tcpTransitoryIdleTimeoutSec- Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#tcp_transitory_idle_timeout_sec ComputeRouterNat#tcp_transitory_idle_timeout_sec}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeRouterNatConfig.Builder timeouts(ComputeRouterNatTimeouts timeouts)
Sets the value ofComputeRouterNatConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#timeouts ComputeRouterNat#timeouts}- Returns:
this
-
udpIdleTimeoutSec
@Stability(Stable) public ComputeRouterNatConfig.Builder udpIdleTimeoutSec(Number udpIdleTimeoutSec)
Sets the value ofComputeRouterNatConfig.getUdpIdleTimeoutSec()- Parameters:
udpIdleTimeoutSec- Timeout (in seconds) for UDP connections. Defaults to 30s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#udp_idle_timeout_sec ComputeRouterNat#udp_idle_timeout_sec}- Returns:
this
-
connection
@Stability(Experimental) public ComputeRouterNatConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public ComputeRouterNatConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeRouterNatConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeRouterNatConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public ComputeRouterNatConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public ComputeRouterNatConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public ComputeRouterNatConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public ComputeRouterNatConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public ComputeRouterNatConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeRouterNatConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeRouterNatConfig>- Returns:
- a new instance of
ComputeRouterNatConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-