All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.batch.kotlin.inputs.InboundNatPoolArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.batch.kotlin.inputs

import com.pulumi.azurenative.batch.inputs.InboundNatPoolArgs.builder
import com.pulumi.azurenative.batch.kotlin.enums.InboundEndpointProtocol
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property backendPort This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400.
 * @property frontendPortRangeEnd Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
 * @property frontendPortRangeStart Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
 * @property name The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters.  If any invalid values are provided the request fails with HTTP status code 400.
 * @property networkSecurityGroupRules The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
 * @property protocol
 */
public data class InboundNatPoolArgs(
    public val backendPort: Output,
    public val frontendPortRangeEnd: Output,
    public val frontendPortRangeStart: Output,
    public val name: Output,
    public val networkSecurityGroupRules: Output>? = null,
    public val protocol: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.batch.inputs.InboundNatPoolArgs =
        com.pulumi.azurenative.batch.inputs.InboundNatPoolArgs.builder()
            .backendPort(backendPort.applyValue({ args0 -> args0 }))
            .frontendPortRangeEnd(frontendPortRangeEnd.applyValue({ args0 -> args0 }))
            .frontendPortRangeStart(frontendPortRangeStart.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .networkSecurityGroupRules(
                networkSecurityGroupRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .protocol(protocol.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [InboundNatPoolArgs].
 */
@PulumiTagMarker
public class InboundNatPoolArgsBuilder internal constructor() {
    private var backendPort: Output? = null

    private var frontendPortRangeEnd: Output? = null

    private var frontendPortRangeStart: Output? = null

    private var name: Output? = null

    private var networkSecurityGroupRules: Output>? = null

    private var protocol: Output? = null

    /**
     * @param value This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400.
     */
    @JvmName("kslnnxxtyiidkdhj")
    public suspend fun backendPort(`value`: Output) {
        this.backendPort = value
    }

    /**
     * @param value Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
     */
    @JvmName("ylgndqvqphknwknf")
    public suspend fun frontendPortRangeEnd(`value`: Output) {
        this.frontendPortRangeEnd = value
    }

    /**
     * @param value Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
     */
    @JvmName("ffitjkfomvsjnese")
    public suspend fun frontendPortRangeStart(`value`: Output) {
        this.frontendPortRangeStart = value
    }

    /**
     * @param value The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters.  If any invalid values are provided the request fails with HTTP status code 400.
     */
    @JvmName("cetgygtimirmyomq")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
     */
    @JvmName("wnoheusmkackfcrv")
    public suspend fun networkSecurityGroupRules(`value`: Output>) {
        this.networkSecurityGroupRules = value
    }

    @JvmName("xwrxtgdcwuogvktu")
    public suspend fun networkSecurityGroupRules(vararg values: Output) {
        this.networkSecurityGroupRules = Output.all(values.asList())
    }

    /**
     * @param values The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
     */
    @JvmName("odwnwvuvydrefcdi")
    public suspend fun networkSecurityGroupRules(values: List>) {
        this.networkSecurityGroupRules = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("bjdxcncjimwtmmdp")
    public suspend fun protocol(`value`: Output) {
        this.protocol = value
    }

    /**
     * @param value This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400.
     */
    @JvmName("hewdvftbdnqpvmvb")
    public suspend fun backendPort(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backendPort = mapped
    }

    /**
     * @param value Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
     */
    @JvmName("yhpjsqlqwtxhlnwm")
    public suspend fun frontendPortRangeEnd(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.frontendPortRangeEnd = mapped
    }

    /**
     * @param value Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
     */
    @JvmName("xjtjqpwfaeroeltj")
    public suspend fun frontendPortRangeStart(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.frontendPortRangeStart = mapped
    }

    /**
     * @param value The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters.  If any invalid values are provided the request fails with HTTP status code 400.
     */
    @JvmName("ugariumodbxmoxaj")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
     */
    @JvmName("oymboqqwlbfttdyk")
    public suspend fun networkSecurityGroupRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkSecurityGroupRules = mapped
    }

    /**
     * @param argument The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
     */
    @JvmName("wftigcwmwxtfoymb")
    public suspend fun networkSecurityGroupRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            NetworkSecurityGroupRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.networkSecurityGroupRules = mapped
    }

    /**
     * @param argument The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
     */
    @JvmName("yognjogffyxcyqrq")
    public suspend fun networkSecurityGroupRules(vararg argument: suspend NetworkSecurityGroupRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            NetworkSecurityGroupRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.networkSecurityGroupRules = mapped
    }

    /**
     * @param argument The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
     */
    @JvmName("yatanrcrbgixsils")
    public suspend fun networkSecurityGroupRules(argument: suspend NetworkSecurityGroupRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            NetworkSecurityGroupRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.networkSecurityGroupRules = mapped
    }

    /**
     * @param values The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
     */
    @JvmName("felvgvruyrbrsvvl")
    public suspend fun networkSecurityGroupRules(vararg values: NetworkSecurityGroupRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.networkSecurityGroupRules = mapped
    }

    /**
     * @param value
     */
    @JvmName("ixldibcnwhegxabo")
    public suspend fun protocol(`value`: InboundEndpointProtocol) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    internal fun build(): InboundNatPoolArgs = InboundNatPoolArgs(
        backendPort = backendPort ?: throw PulumiNullFieldException("backendPort"),
        frontendPortRangeEnd = frontendPortRangeEnd ?: throw
            PulumiNullFieldException("frontendPortRangeEnd"),
        frontendPortRangeStart = frontendPortRangeStart ?: throw
            PulumiNullFieldException("frontendPortRangeStart"),
        name = name ?: throw PulumiNullFieldException("name"),
        networkSecurityGroupRules = networkSecurityGroupRules,
        protocol = protocol ?: throw PulumiNullFieldException("protocol"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy