Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.lb.kotlin
import com.pulumi.azure.lb.NatRuleArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a Load Balancer NAT Rule.
* > **NOTE:** This resource cannot be used with with virtual machine scale sets, instead use the `azure.lb.NatPool` resource.
* > **NOTE** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached
* ## Example Usage
*
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: LoadBalancerRG
* location: West Europe
* examplePublicIp:
* type: azure:network:PublicIp
* name: example
* properties:
* name: PublicIPForLB
* location: West US
* resourceGroupName: ${example.name}
* allocationMethod: Static
* exampleLoadBalancer:
* type: azure:lb:LoadBalancer
* name: example
* properties:
* name: TestLoadBalancer
* location: West US
* resourceGroupName: ${example.name}
* frontendIpConfigurations:
* - name: PublicIPAddress
* publicIpAddressId: ${examplePublicIp.id}
* exampleBackendAddressPool:
* type: azure:lb:BackendAddressPool
* name: example
* properties:
* resourceGroupName: ${example.name}
* loadbalancerId: ${exampleLoadBalancer.id}
* name: be
* exampleNatRule:
* type: azure:lb:NatRule
* name: example
* properties:
* resourceGroupName: ${example.name}
* loadbalancerId: ${exampleLoadBalancer.id}
* name: RDPAccess
* protocol: Tcp
* frontendPort: 3389
* backendPort: 3389
* frontendIpConfigurationName: PublicIPAddress
* example1:
* type: azure:lb:NatRule
* properties:
* resourceGroupName: ${example.name}
* loadbalancerId: ${exampleLoadBalancer.id}
* name: RDPAccess
* protocol: Tcp
* frontendPortStart: 3000
* frontendPortEnd: 3389
* backendPort: 3389
* backendAddressPoolId: ${exampleBackendAddressPool.id}
* frontendIpConfigurationName: PublicIPAddress
* ```
*
* ## Import
* Load Balancer NAT Rules can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:lb/natRule:NatRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule1
* ```
* @property backendAddressPoolId Specifies a reference to backendAddressPool resource.
* @property backendPort The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
* @property enableFloatingIp Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
* @property enableTcpReset Is TCP Reset enabled for this Load Balancer Rule?
* @property frontendIpConfigurationName The name of the frontend IP configuration exposing this rule.
* @property frontendPort The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
* @property frontendPortEnd The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
* @property frontendPortStart The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
* @property idleTimeoutInMinutes Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes.
* @property loadbalancerId The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created.
* @property name Specifies the name of the NAT Rule. Changing this forces a new resource to be created.
* @property protocol The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`.
* @property resourceGroupName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
*/
public data class NatRuleArgs(
public val backendAddressPoolId: Output? = null,
public val backendPort: Output? = null,
public val enableFloatingIp: Output? = null,
public val enableTcpReset: Output? = null,
public val frontendIpConfigurationName: Output? = null,
public val frontendPort: Output? = null,
public val frontendPortEnd: Output? = null,
public val frontendPortStart: Output? = null,
public val idleTimeoutInMinutes: Output? = null,
public val loadbalancerId: Output? = null,
public val name: Output? = null,
public val protocol: Output? = null,
public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.lb.NatRuleArgs = com.pulumi.azure.lb.NatRuleArgs.builder()
.backendAddressPoolId(backendAddressPoolId?.applyValue({ args0 -> args0 }))
.backendPort(backendPort?.applyValue({ args0 -> args0 }))
.enableFloatingIp(enableFloatingIp?.applyValue({ args0 -> args0 }))
.enableTcpReset(enableTcpReset?.applyValue({ args0 -> args0 }))
.frontendIpConfigurationName(frontendIpConfigurationName?.applyValue({ args0 -> args0 }))
.frontendPort(frontendPort?.applyValue({ args0 -> args0 }))
.frontendPortEnd(frontendPortEnd?.applyValue({ args0 -> args0 }))
.frontendPortStart(frontendPortStart?.applyValue({ args0 -> args0 }))
.idleTimeoutInMinutes(idleTimeoutInMinutes?.applyValue({ args0 -> args0 }))
.loadbalancerId(loadbalancerId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.protocol(protocol?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [NatRuleArgs].
*/
@PulumiTagMarker
public class NatRuleArgsBuilder internal constructor() {
private var backendAddressPoolId: Output? = null
private var backendPort: Output? = null
private var enableFloatingIp: Output? = null
private var enableTcpReset: Output? = null
private var frontendIpConfigurationName: Output? = null
private var frontendPort: Output? = null
private var frontendPortEnd: Output? = null
private var frontendPortStart: Output? = null
private var idleTimeoutInMinutes: Output? = null
private var loadbalancerId: Output? = null
private var name: Output? = null
private var protocol: Output? = null
private var resourceGroupName: Output? = null
/**
* @param value Specifies a reference to backendAddressPool resource.
*/
@JvmName("oafitbgbiwwvpwip")
public suspend fun backendAddressPoolId(`value`: Output) {
this.backendAddressPoolId = value
}
/**
* @param value The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
*/
@JvmName("vsdwklkjakrrruyx")
public suspend fun backendPort(`value`: Output) {
this.backendPort = value
}
/**
* @param value Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
*/
@JvmName("dmnnjjovqplknqvx")
public suspend fun enableFloatingIp(`value`: Output) {
this.enableFloatingIp = value
}
/**
* @param value Is TCP Reset enabled for this Load Balancer Rule?
*/
@JvmName("owehueinmpynyviw")
public suspend fun enableTcpReset(`value`: Output) {
this.enableTcpReset = value
}
/**
* @param value The name of the frontend IP configuration exposing this rule.
*/
@JvmName("oeqtqsfkgkpcgelu")
public suspend fun frontendIpConfigurationName(`value`: Output) {
this.frontendIpConfigurationName = value
}
/**
* @param value The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
*/
@JvmName("uvhetkawmsjwjpye")
public suspend fun frontendPort(`value`: Output) {
this.frontendPort = value
}
/**
* @param value The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
*/
@JvmName("vqdldnungqjtoyhs")
public suspend fun frontendPortEnd(`value`: Output) {
this.frontendPortEnd = value
}
/**
* @param value The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
*/
@JvmName("lufdjemjgnnmwlyg")
public suspend fun frontendPortStart(`value`: Output) {
this.frontendPortStart = value
}
/**
* @param value Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes.
*/
@JvmName("ubapwacorlouvvgm")
public suspend fun idleTimeoutInMinutes(`value`: Output) {
this.idleTimeoutInMinutes = value
}
/**
* @param value The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created.
*/
@JvmName("rrvbmaefvcgowtpc")
public suspend fun loadbalancerId(`value`: Output) {
this.loadbalancerId = value
}
/**
* @param value Specifies the name of the NAT Rule. Changing this forces a new resource to be created.
*/
@JvmName("jgyhdivacjamrhjs")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`.
*/
@JvmName("dtligcindchlemav")
public suspend fun protocol(`value`: Output) {
this.protocol = value
}
/**
* @param value The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
*/
@JvmName("aispisjgynxogxjy")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Specifies a reference to backendAddressPool resource.
*/
@JvmName("rstrldiijbtxkubq")
public suspend fun backendAddressPoolId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backendAddressPoolId = mapped
}
/**
* @param value The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
*/
@JvmName("dnstqmuuogakluqo")
public suspend fun backendPort(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backendPort = mapped
}
/**
* @param value Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
*/
@JvmName("qplyiplcdlvvwysk")
public suspend fun enableFloatingIp(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enableFloatingIp = mapped
}
/**
* @param value Is TCP Reset enabled for this Load Balancer Rule?
*/
@JvmName("fhicdcecftmxdbnv")
public suspend fun enableTcpReset(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enableTcpReset = mapped
}
/**
* @param value The name of the frontend IP configuration exposing this rule.
*/
@JvmName("mtmqyoijxlyitcpa")
public suspend fun frontendIpConfigurationName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.frontendIpConfigurationName = mapped
}
/**
* @param value The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
*/
@JvmName("wreitfidvndxomsa")
public suspend fun frontendPort(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.frontendPort = mapped
}
/**
* @param value The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
*/
@JvmName("bgasnwredxybppwt")
public suspend fun frontendPortEnd(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.frontendPortEnd = mapped
}
/**
* @param value The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
*/
@JvmName("tlaqpnilglorbxpr")
public suspend fun frontendPortStart(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.frontendPortStart = mapped
}
/**
* @param value Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes.
*/
@JvmName("llfueuxtbymmytdr")
public suspend fun idleTimeoutInMinutes(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.idleTimeoutInMinutes = mapped
}
/**
* @param value The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created.
*/
@JvmName("ckvvmuccogcxunty")
public suspend fun loadbalancerId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.loadbalancerId = mapped
}
/**
* @param value Specifies the name of the NAT Rule. Changing this forces a new resource to be created.
*/
@JvmName("ujjeqhgmtcxxvkfy")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`.
*/
@JvmName("sytbvtgtxcoqbjgk")
public suspend fun protocol(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.protocol = mapped
}
/**
* @param value The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
*/
@JvmName("pbpfsnharaxvwyhf")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
internal fun build(): NatRuleArgs = NatRuleArgs(
backendAddressPoolId = backendAddressPoolId,
backendPort = backendPort,
enableFloatingIp = enableFloatingIp,
enableTcpReset = enableTcpReset,
frontendIpConfigurationName = frontendIpConfigurationName,
frontendPort = frontendPort,
frontendPortEnd = frontendPortEnd,
frontendPortStart = frontendPortStart,
idleTimeoutInMinutes = idleTimeoutInMinutes,
loadbalancerId = loadbalancerId,
name = name,
protocol = protocol,
resourceGroupName = resourceGroupName,
)
}