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

com.pulumi.awsnative.gamelift.kotlin.inputs.FleetContainerGroupsConfigurationArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.gamelift.kotlin.inputs

import com.pulumi.awsnative.gamelift.inputs.FleetContainerGroupsConfigurationArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Specifies container groups that this instance will hold. You must specify exactly one replica group. Optionally, you may specify exactly one daemon group. You can't change this property after you create the fleet.
 * @property connectionPortRange A set of ports to allow inbound traffic, including game clients, to connect to processes running in the container fleet.
 * Connection ports are dynamically mapped to container ports, which are assigned to individual processes running in a container. The connection port range must have enough ports to map to all container ports across a fleet instance. To calculate the minimum connection ports needed, use the following formula:
 * *[Total number of container ports as defined for containers in the replica container group] * [Desired or calculated number of replica container groups per instance] + [Total number of container ports as defined for containers in the daemon container group]*
 * As a best practice, double the minimum number of connection ports.
 * > Use the fleet's `EC2InboundPermissions` property to control external access to connection ports. Set this property to the connection port numbers that you want to open access to. See `IpPermission` for more details.
 * @property containerGroupDefinitionNames The names of the container group definitions that will be created in an instance. You must specify exactly one REPLICA container group. You have the option to also specify one DAEMON container group.
 * @property containerGroupsPerInstance
 */
public data class FleetContainerGroupsConfigurationArgs(
    public val connectionPortRange: Output,
    public val containerGroupDefinitionNames: Output>,
    public val containerGroupsPerInstance: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.gamelift.inputs.FleetContainerGroupsConfigurationArgs = com.pulumi.awsnative.gamelift.inputs.FleetContainerGroupsConfigurationArgs.builder()
        .connectionPortRange(
            connectionPortRange.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .containerGroupDefinitionNames(
            containerGroupDefinitionNames.applyValue({ args0 ->
                args0.map({ args0 -> args0 })
            }),
        )
        .containerGroupsPerInstance(
            containerGroupsPerInstance?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        ).build()
}

/**
 * Builder for [FleetContainerGroupsConfigurationArgs].
 */
@PulumiTagMarker
public class FleetContainerGroupsConfigurationArgsBuilder internal constructor() {
    private var connectionPortRange: Output? = null

    private var containerGroupDefinitionNames: Output>? = null

    private var containerGroupsPerInstance: Output? = null

    /**
     * @param value A set of ports to allow inbound traffic, including game clients, to connect to processes running in the container fleet.
     * Connection ports are dynamically mapped to container ports, which are assigned to individual processes running in a container. The connection port range must have enough ports to map to all container ports across a fleet instance. To calculate the minimum connection ports needed, use the following formula:
     * *[Total number of container ports as defined for containers in the replica container group] * [Desired or calculated number of replica container groups per instance] + [Total number of container ports as defined for containers in the daemon container group]*
     * As a best practice, double the minimum number of connection ports.
     * > Use the fleet's `EC2InboundPermissions` property to control external access to connection ports. Set this property to the connection port numbers that you want to open access to. See `IpPermission` for more details.
     */
    @JvmName("idrrihiieaelypec")
    public suspend fun connectionPortRange(`value`: Output) {
        this.connectionPortRange = value
    }

    /**
     * @param value The names of the container group definitions that will be created in an instance. You must specify exactly one REPLICA container group. You have the option to also specify one DAEMON container group.
     */
    @JvmName("igixgtporymfsnpm")
    public suspend fun containerGroupDefinitionNames(`value`: Output>) {
        this.containerGroupDefinitionNames = value
    }

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

    /**
     * @param values The names of the container group definitions that will be created in an instance. You must specify exactly one REPLICA container group. You have the option to also specify one DAEMON container group.
     */
    @JvmName("eoqbikixugtprnyn")
    public suspend fun containerGroupDefinitionNames(values: List>) {
        this.containerGroupDefinitionNames = Output.all(values)
    }

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

    /**
     * @param value A set of ports to allow inbound traffic, including game clients, to connect to processes running in the container fleet.
     * Connection ports are dynamically mapped to container ports, which are assigned to individual processes running in a container. The connection port range must have enough ports to map to all container ports across a fleet instance. To calculate the minimum connection ports needed, use the following formula:
     * *[Total number of container ports as defined for containers in the replica container group] * [Desired or calculated number of replica container groups per instance] + [Total number of container ports as defined for containers in the daemon container group]*
     * As a best practice, double the minimum number of connection ports.
     * > Use the fleet's `EC2InboundPermissions` property to control external access to connection ports. Set this property to the connection port numbers that you want to open access to. See `IpPermission` for more details.
     */
    @JvmName("ipyntunwperucwvi")
    public suspend fun connectionPortRange(`value`: FleetConnectionPortRangeArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.connectionPortRange = mapped
    }

    /**
     * @param argument A set of ports to allow inbound traffic, including game clients, to connect to processes running in the container fleet.
     * Connection ports are dynamically mapped to container ports, which are assigned to individual processes running in a container. The connection port range must have enough ports to map to all container ports across a fleet instance. To calculate the minimum connection ports needed, use the following formula:
     * *[Total number of container ports as defined for containers in the replica container group] * [Desired or calculated number of replica container groups per instance] + [Total number of container ports as defined for containers in the daemon container group]*
     * As a best practice, double the minimum number of connection ports.
     * > Use the fleet's `EC2InboundPermissions` property to control external access to connection ports. Set this property to the connection port numbers that you want to open access to. See `IpPermission` for more details.
     */
    @JvmName("flmnuitnxncdwgyy")
    public suspend fun connectionPortRange(argument: suspend FleetConnectionPortRangeArgsBuilder.() -> Unit) {
        val toBeMapped = FleetConnectionPortRangeArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.connectionPortRange = mapped
    }

    /**
     * @param value The names of the container group definitions that will be created in an instance. You must specify exactly one REPLICA container group. You have the option to also specify one DAEMON container group.
     */
    @JvmName("ssfdtcnowlwqeyef")
    public suspend fun containerGroupDefinitionNames(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containerGroupDefinitionNames = mapped
    }

    /**
     * @param values The names of the container group definitions that will be created in an instance. You must specify exactly one REPLICA container group. You have the option to also specify one DAEMON container group.
     */
    @JvmName("obycrpeenfpyqucp")
    public suspend fun containerGroupDefinitionNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containerGroupDefinitionNames = mapped
    }

    /**
     * @param value
     */
    @JvmName("setnsrnjkfxbtiak")
    public suspend fun containerGroupsPerInstance(`value`: FleetContainerGroupsPerInstanceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerGroupsPerInstance = mapped
    }

    /**
     * @param argument
     */
    @JvmName("vstvgdpkvrxbpmgm")
    public suspend fun containerGroupsPerInstance(argument: suspend FleetContainerGroupsPerInstanceArgsBuilder.() -> Unit) {
        val toBeMapped = FleetContainerGroupsPerInstanceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.containerGroupsPerInstance = mapped
    }

    internal fun build(): FleetContainerGroupsConfigurationArgs =
        FleetContainerGroupsConfigurationArgs(
            connectionPortRange = connectionPortRange ?: throw PulumiNullFieldException("connectionPortRange"),
            containerGroupDefinitionNames = containerGroupDefinitionNames ?: throw
                PulumiNullFieldException("containerGroupDefinitionNames"),
            containerGroupsPerInstance = containerGroupsPerInstance,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy