![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.network.kotlin.InboundNatRuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin
import com.pulumi.azurenative.network.InboundNatRuleArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.TransportProtocol
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgs
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Inbound NAT rule of the load balancer.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
* Other available API versions: 2019-06-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
* ## Example Usage
* ### InboundNatRuleCreate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var inboundNatRule = new AzureNative.Network.InboundNatRule("inboundNatRule", new()
* {
* BackendPort = 3389,
* EnableFloatingIP = false,
* EnableTcpReset = false,
* FrontendIPConfiguration = new AzureNative.Network.Inputs.SubResourceArgs
* {
* Id = "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1",
* },
* FrontendPort = 3390,
* IdleTimeoutInMinutes = 4,
* InboundNatRuleName = "natRule1.1",
* LoadBalancerName = "lb1",
* Protocol = AzureNative.Network.TransportProtocol.Tcp,
* ResourceGroupName = "testrg",
* });
* });
* ```
* ```go
* package main
* import (
* network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := network.NewInboundNatRule(ctx, "inboundNatRule", &network.InboundNatRuleArgs{
* BackendPort: pulumi.Int(3389),
* EnableFloatingIP: pulumi.Bool(false),
* EnableTcpReset: pulumi.Bool(false),
* FrontendIPConfiguration: &network.SubResourceArgs{
* Id: pulumi.String("/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1"),
* },
* FrontendPort: pulumi.Int(3390),
* IdleTimeoutInMinutes: pulumi.Int(4),
* InboundNatRuleName: pulumi.String("natRule1.1"),
* LoadBalancerName: pulumi.String("lb1"),
* Protocol: pulumi.String(network.TransportProtocolTcp),
* ResourceGroupName: pulumi.String("testrg"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.network.InboundNatRule;
* import com.pulumi.azurenative.network.InboundNatRuleArgs;
* import com.pulumi.azurenative.network.inputs.SubResourceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var inboundNatRule = new InboundNatRule("inboundNatRule", InboundNatRuleArgs.builder()
* .backendPort(3389)
* .enableFloatingIP(false)
* .enableTcpReset(false)
* .frontendIPConfiguration(SubResourceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1")
* .build())
* .frontendPort(3390)
* .idleTimeoutInMinutes(4)
* .inboundNatRuleName("natRule1.1")
* .loadBalancerName("lb1")
* .protocol("Tcp")
* .resourceGroupName("testrg")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:network:InboundNatRule natRule1.1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}
* ```
* @property backendAddressPool A reference to backendAddressPool resource.
* @property backendPort The port used for the internal endpoint. Acceptable values range from 1 to 65535.
* @property enableFloatingIP Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
* @property enableTcpReset Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
* @property frontendIPConfiguration A reference to frontend IP addresses.
* @property frontendPort The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534.
* @property frontendPortRangeEnd 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.
* @property frontendPortRangeStart 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.
* @property id Resource ID.
* @property idleTimeoutInMinutes The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
* @property inboundNatRuleName The name of the inbound NAT rule.
* @property loadBalancerName The name of the load balancer.
* @property name The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource.
* @property protocol The reference to the transport protocol used by the load balancing rule.
* @property resourceGroupName The name of the resource group.
*/
public data class InboundNatRuleArgs(
public val backendAddressPool: Output? = null,
public val backendPort: Output? = null,
public val enableFloatingIP: Output? = null,
public val enableTcpReset: Output? = null,
public val frontendIPConfiguration: Output? = null,
public val frontendPort: Output? = null,
public val frontendPortRangeEnd: Output? = null,
public val frontendPortRangeStart: Output? = null,
public val id: Output? = null,
public val idleTimeoutInMinutes: Output? = null,
public val inboundNatRuleName: Output? = null,
public val loadBalancerName: Output? = null,
public val name: Output? = null,
public val protocol: Output>? = null,
public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.InboundNatRuleArgs =
com.pulumi.azurenative.network.InboundNatRuleArgs.builder()
.backendAddressPool(
backendAddressPool?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.backendPort(backendPort?.applyValue({ args0 -> args0 }))
.enableFloatingIP(enableFloatingIP?.applyValue({ args0 -> args0 }))
.enableTcpReset(enableTcpReset?.applyValue({ args0 -> args0 }))
.frontendIPConfiguration(
frontendIPConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.frontendPort(frontendPort?.applyValue({ args0 -> args0 }))
.frontendPortRangeEnd(frontendPortRangeEnd?.applyValue({ args0 -> args0 }))
.frontendPortRangeStart(frontendPortRangeStart?.applyValue({ args0 -> args0 }))
.id(id?.applyValue({ args0 -> args0 }))
.idleTimeoutInMinutes(idleTimeoutInMinutes?.applyValue({ args0 -> args0 }))
.inboundNatRuleName(inboundNatRuleName?.applyValue({ args0 -> args0 }))
.loadBalancerName(loadBalancerName?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.protocol(
protocol?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [InboundNatRuleArgs].
*/
@PulumiTagMarker
public class InboundNatRuleArgsBuilder internal constructor() {
private var backendAddressPool: Output? = null
private var backendPort: Output? = null
private var enableFloatingIP: Output? = null
private var enableTcpReset: Output? = null
private var frontendIPConfiguration: Output? = null
private var frontendPort: Output? = null
private var frontendPortRangeEnd: Output? = null
private var frontendPortRangeStart: Output? = null
private var id: Output? = null
private var idleTimeoutInMinutes: Output? = null
private var inboundNatRuleName: Output? = null
private var loadBalancerName: Output? = null
private var name: Output? = null
private var protocol: Output>? = null
private var resourceGroupName: Output? = null
/**
* @param value A reference to backendAddressPool resource.
*/
@JvmName("fyjhuqkoqmvxkbqk")
public suspend fun backendAddressPool(`value`: Output) {
this.backendAddressPool = value
}
/**
* @param value The port used for the internal endpoint. Acceptable values range from 1 to 65535.
*/
@JvmName("doynhkixayutxtfb")
public suspend fun backendPort(`value`: Output) {
this.backendPort = value
}
/**
* @param value Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
*/
@JvmName("jduvgadtscgaltii")
public suspend fun enableFloatingIP(`value`: Output) {
this.enableFloatingIP = value
}
/**
* @param value Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
*/
@JvmName("tmyyyhkucdnjfldl")
public suspend fun enableTcpReset(`value`: Output) {
this.enableTcpReset = value
}
/**
* @param value A reference to frontend IP addresses.
*/
@JvmName("ylfkgdrikfeddpau")
public suspend fun frontendIPConfiguration(`value`: Output) {
this.frontendIPConfiguration = value
}
/**
* @param value The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534.
*/
@JvmName("mddsdowuudccxfnv")
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.
*/
@JvmName("skdjkjxxjccmnfas")
public suspend fun frontendPortRangeEnd(`value`: Output) {
this.frontendPortRangeEnd = 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.
*/
@JvmName("dxckojcjmomagnad")
public suspend fun frontendPortRangeStart(`value`: Output) {
this.frontendPortRangeStart = value
}
/**
* @param value Resource ID.
*/
@JvmName("fmljrsdpttyufhxo")
public suspend fun id(`value`: Output) {
this.id = value
}
/**
* @param value The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
*/
@JvmName("yvdssgkylpbrursm")
public suspend fun idleTimeoutInMinutes(`value`: Output) {
this.idleTimeoutInMinutes = value
}
/**
* @param value The name of the inbound NAT rule.
*/
@JvmName("fafmjsjkslilliov")
public suspend fun inboundNatRuleName(`value`: Output) {
this.inboundNatRuleName = value
}
/**
* @param value The name of the load balancer.
*/
@JvmName("kvcxproiuyocscbl")
public suspend fun loadBalancerName(`value`: Output) {
this.loadBalancerName = value
}
/**
* @param value The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource.
*/
@JvmName("btlcqqfijaymkvnv")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The reference to the transport protocol used by the load balancing rule.
*/
@JvmName("abqbqwnmgpwcavwo")
public suspend fun protocol(`value`: Output>) {
this.protocol = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("smtcddllypdjwjnq")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A reference to backendAddressPool resource.
*/
@JvmName("qjkjkbemrihyfehy")
public suspend fun backendAddressPool(`value`: SubResourceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backendAddressPool = mapped
}
/**
* @param argument A reference to backendAddressPool resource.
*/
@JvmName("ajitjuxrcpxompse")
public suspend fun backendAddressPool(argument: suspend SubResourceArgsBuilder.() -> Unit) {
val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.backendAddressPool = mapped
}
/**
* @param value The port used for the internal endpoint. Acceptable values range from 1 to 65535.
*/
@JvmName("ljklnxbxqohjebyj")
public suspend fun backendPort(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backendPort = mapped
}
/**
* @param value Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
*/
@JvmName("vinqejigdrepioia")
public suspend fun enableFloatingIP(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enableFloatingIP = mapped
}
/**
* @param value Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
*/
@JvmName("ogtsxrubnqafgfpc")
public suspend fun enableTcpReset(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enableTcpReset = mapped
}
/**
* @param value A reference to frontend IP addresses.
*/
@JvmName("owfvdphbynagaigr")
public suspend fun frontendIPConfiguration(`value`: SubResourceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.frontendIPConfiguration = mapped
}
/**
* @param argument A reference to frontend IP addresses.
*/
@JvmName("ricjkymactlfocuu")
public suspend fun frontendIPConfiguration(argument: suspend SubResourceArgsBuilder.() -> Unit) {
val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.frontendIPConfiguration = mapped
}
/**
* @param value The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534.
*/
@JvmName("mikqccefxygumqku")
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.
*/
@JvmName("pmrqjbtetwdxlgca")
public suspend fun frontendPortRangeEnd(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.frontendPortRangeEnd = 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.
*/
@JvmName("ppandfhdodjufdti")
public suspend fun frontendPortRangeStart(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.frontendPortRangeStart = mapped
}
/**
* @param value Resource ID.
*/
@JvmName("ahqmqifclrdinsjb")
public suspend fun id(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.id = mapped
}
/**
* @param value The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
*/
@JvmName("cealkhwulytcnyib")
public suspend fun idleTimeoutInMinutes(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.idleTimeoutInMinutes = mapped
}
/**
* @param value The name of the inbound NAT rule.
*/
@JvmName("jsosgtvbbsyvtcvk")
public suspend fun inboundNatRuleName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.inboundNatRuleName = mapped
}
/**
* @param value The name of the load balancer.
*/
@JvmName("iipetbjkwodrgfjf")
public suspend fun loadBalancerName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.loadBalancerName = mapped
}
/**
* @param value The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource.
*/
@JvmName("mqikyppvqrenejuk")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The reference to the transport protocol used by the load balancing rule.
*/
@JvmName("jfembcfrrsuvpaev")
public suspend fun protocol(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.protocol = mapped
}
/**
* @param value The reference to the transport protocol used by the load balancing rule.
*/
@JvmName("yatcasyefvonfckd")
public fun protocol(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.protocol = mapped
}
/**
* @param value The reference to the transport protocol used by the load balancing rule.
*/
@JvmName("wdhygrmdsyjbbjsa")
public fun protocol(`value`: TransportProtocol) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.protocol = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("ihgdnnfhjpcplqko")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
internal fun build(): InboundNatRuleArgs = InboundNatRuleArgs(
backendAddressPool = backendAddressPool,
backendPort = backendPort,
enableFloatingIP = enableFloatingIP,
enableTcpReset = enableTcpReset,
frontendIPConfiguration = frontendIPConfiguration,
frontendPort = frontendPort,
frontendPortRangeEnd = frontendPortRangeEnd,
frontendPortRangeStart = frontendPortRangeStart,
id = id,
idleTimeoutInMinutes = idleTimeoutInMinutes,
inboundNatRuleName = inboundNatRuleName,
loadBalancerName = loadBalancerName,
name = name,
protocol = protocol,
resourceGroupName = resourceGroupName,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy