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

com.pulumi.aws.gamelift.kotlin.GameSessionQueueArgs.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: 6.66.3.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.gamelift.kotlin

import com.pulumi.aws.gamelift.GameSessionQueueArgs.builder
import com.pulumi.aws.gamelift.kotlin.inputs.GameSessionQueuePlayerLatencyPolicyArgs
import com.pulumi.aws.gamelift.kotlin.inputs.GameSessionQueuePlayerLatencyPolicyArgsBuilder
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides an GameLift Game Session Queue resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const test = new aws.gamelift.GameSessionQueue("test", {
 *     name: "example-session-queue",
 *     destinations: [
 *         usWest2Fleet.arn,
 *         euCentral1Fleet.arn,
 *     ],
 *     notificationTarget: gameSessionQueueNotifications.arn,
 *     playerLatencyPolicies: [
 *         {
 *             maximumIndividualPlayerLatencyMilliseconds: 100,
 *             policyDurationSeconds: 5,
 *         },
 *         {
 *             maximumIndividualPlayerLatencyMilliseconds: 200,
 *         },
 *     ],
 *     timeoutInSeconds: 60,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * test = aws.gamelift.GameSessionQueue("test",
 *     name="example-session-queue",
 *     destinations=[
 *         us_west2_fleet["arn"],
 *         eu_central1_fleet["arn"],
 *     ],
 *     notification_target=game_session_queue_notifications["arn"],
 *     player_latency_policies=[
 *         {
 *             "maximum_individual_player_latency_milliseconds": 100,
 *             "policy_duration_seconds": 5,
 *         },
 *         {
 *             "maximum_individual_player_latency_milliseconds": 200,
 *         },
 *     ],
 *     timeout_in_seconds=60)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Aws.GameLift.GameSessionQueue("test", new()
 *     {
 *         Name = "example-session-queue",
 *         Destinations = new[]
 *         {
 *             usWest2Fleet.Arn,
 *             euCentral1Fleet.Arn,
 *         },
 *         NotificationTarget = gameSessionQueueNotifications.Arn,
 *         PlayerLatencyPolicies = new[]
 *         {
 *             new Aws.GameLift.Inputs.GameSessionQueuePlayerLatencyPolicyArgs
 *             {
 *                 MaximumIndividualPlayerLatencyMilliseconds = 100,
 *                 PolicyDurationSeconds = 5,
 *             },
 *             new Aws.GameLift.Inputs.GameSessionQueuePlayerLatencyPolicyArgs
 *             {
 *                 MaximumIndividualPlayerLatencyMilliseconds = 200,
 *             },
 *         },
 *         TimeoutInSeconds = 60,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/gamelift"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := gamelift.NewGameSessionQueue(ctx, "test", &gamelift.GameSessionQueueArgs{
 * 			Name: pulumi.String("example-session-queue"),
 * 			Destinations: pulumi.StringArray{
 * 				usWest2Fleet.Arn,
 * 				euCentral1Fleet.Arn,
 * 			},
 * 			NotificationTarget: pulumi.Any(gameSessionQueueNotifications.Arn),
 * 			PlayerLatencyPolicies: gamelift.GameSessionQueuePlayerLatencyPolicyArray{
 * 				&gamelift.GameSessionQueuePlayerLatencyPolicyArgs{
 * 					MaximumIndividualPlayerLatencyMilliseconds: pulumi.Int(100),
 * 					PolicyDurationSeconds:                      pulumi.Int(5),
 * 				},
 * 				&gamelift.GameSessionQueuePlayerLatencyPolicyArgs{
 * 					MaximumIndividualPlayerLatencyMilliseconds: pulumi.Int(200),
 * 				},
 * 			},
 * 			TimeoutInSeconds: pulumi.Int(60),
 * 		})
 * 		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.aws.gamelift.GameSessionQueue;
 * import com.pulumi.aws.gamelift.GameSessionQueueArgs;
 * import com.pulumi.aws.gamelift.inputs.GameSessionQueuePlayerLatencyPolicyArgs;
 * 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 test = new GameSessionQueue("test", GameSessionQueueArgs.builder()
 *             .name("example-session-queue")
 *             .destinations(
 *                 usWest2Fleet.arn(),
 *                 euCentral1Fleet.arn())
 *             .notificationTarget(gameSessionQueueNotifications.arn())
 *             .playerLatencyPolicies(
 *                 GameSessionQueuePlayerLatencyPolicyArgs.builder()
 *                     .maximumIndividualPlayerLatencyMilliseconds(100)
 *                     .policyDurationSeconds(5)
 *                     .build(),
 *                 GameSessionQueuePlayerLatencyPolicyArgs.builder()
 *                     .maximumIndividualPlayerLatencyMilliseconds(200)
 *                     .build())
 *             .timeoutInSeconds(60)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: aws:gamelift:GameSessionQueue
 *     properties:
 *       name: example-session-queue
 *       destinations:
 *         - ${usWest2Fleet.arn}
 *         - ${euCentral1Fleet.arn}
 *       notificationTarget: ${gameSessionQueueNotifications.arn}
 *       playerLatencyPolicies:
 *         - maximumIndividualPlayerLatencyMilliseconds: 100
 *           policyDurationSeconds: 5
 *         - maximumIndividualPlayerLatencyMilliseconds: 200
 *       timeoutInSeconds: 60
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import GameLift Game Session Queues using their `name`. For example:
 * ```sh
 * $ pulumi import aws:gamelift/gameSessionQueue:GameSessionQueue example example
 * ```
 * @property customEventData Information to be added to all events that are related to this game session queue.
 * @property destinations List of fleet/alias ARNs used by session queue for placing game sessions.
 * @property name Name of the session queue.
 * @property notificationTarget An SNS topic ARN that is set up to receive game session placement notifications.
 * @property playerLatencyPolicies One or more policies used to choose fleet based on player latency. See below.
 * @property tags Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property timeoutInSeconds Maximum time a game session request can remain in the queue.
 */
public data class GameSessionQueueArgs(
    public val customEventData: Output? = null,
    public val destinations: Output>? = null,
    public val name: Output? = null,
    public val notificationTarget: Output? = null,
    public val playerLatencyPolicies: Output>? = null,
    public val tags: Output>? = null,
    public val timeoutInSeconds: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.gamelift.GameSessionQueueArgs =
        com.pulumi.aws.gamelift.GameSessionQueueArgs.builder()
            .customEventData(customEventData?.applyValue({ args0 -> args0 }))
            .destinations(destinations?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .notificationTarget(notificationTarget?.applyValue({ args0 -> args0 }))
            .playerLatencyPolicies(
                playerLatencyPolicies?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .timeoutInSeconds(timeoutInSeconds?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GameSessionQueueArgs].
 */
@PulumiTagMarker
public class GameSessionQueueArgsBuilder internal constructor() {
    private var customEventData: Output? = null

    private var destinations: Output>? = null

    private var name: Output? = null

    private var notificationTarget: Output? = null

    private var playerLatencyPolicies: Output>? = null

    private var tags: Output>? = null

    private var timeoutInSeconds: Output? = null

    /**
     * @param value Information to be added to all events that are related to this game session queue.
     */
    @JvmName("tvgaisqwvbythtso")
    public suspend fun customEventData(`value`: Output) {
        this.customEventData = value
    }

    /**
     * @param value List of fleet/alias ARNs used by session queue for placing game sessions.
     */
    @JvmName("xogkiuaeubkxghle")
    public suspend fun destinations(`value`: Output>) {
        this.destinations = value
    }

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

    /**
     * @param values List of fleet/alias ARNs used by session queue for placing game sessions.
     */
    @JvmName("nxesyxcexrjdmcow")
    public suspend fun destinations(values: List>) {
        this.destinations = Output.all(values)
    }

    /**
     * @param value Name of the session queue.
     */
    @JvmName("aeqqpwoanekpclwu")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value An SNS topic ARN that is set up to receive game session placement notifications.
     */
    @JvmName("qkiatdwmypeoabnj")
    public suspend fun notificationTarget(`value`: Output) {
        this.notificationTarget = value
    }

    /**
     * @param value One or more policies used to choose fleet based on player latency. See below.
     */
    @JvmName("eptlavrboamibkeb")
    public suspend fun playerLatencyPolicies(`value`: Output>) {
        this.playerLatencyPolicies = value
    }

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

    /**
     * @param values One or more policies used to choose fleet based on player latency. See below.
     */
    @JvmName("llllhtamdeqgbugf")
    public suspend fun playerLatencyPolicies(values: List>) {
        this.playerLatencyPolicies = Output.all(values)
    }

    /**
     * @param value Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("aktonmqybbtjwair")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Maximum time a game session request can remain in the queue.
     */
    @JvmName("qcwkeqflytwgkhfl")
    public suspend fun timeoutInSeconds(`value`: Output) {
        this.timeoutInSeconds = value
    }

    /**
     * @param value Information to be added to all events that are related to this game session queue.
     */
    @JvmName("frvpitmytmnwxcro")
    public suspend fun customEventData(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customEventData = mapped
    }

    /**
     * @param value List of fleet/alias ARNs used by session queue for placing game sessions.
     */
    @JvmName("lkhoxleevwuxmxsv")
    public suspend fun destinations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinations = mapped
    }

    /**
     * @param values List of fleet/alias ARNs used by session queue for placing game sessions.
     */
    @JvmName("fqheaibkoaubbrjk")
    public suspend fun destinations(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinations = mapped
    }

    /**
     * @param value Name of the session queue.
     */
    @JvmName("bxlwejygbrkvpnpj")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value An SNS topic ARN that is set up to receive game session placement notifications.
     */
    @JvmName("xinmryfjmfhorlyj")
    public suspend fun notificationTarget(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationTarget = mapped
    }

    /**
     * @param value One or more policies used to choose fleet based on player latency. See below.
     */
    @JvmName("ceuviodqspqdfjmo")
    public suspend fun playerLatencyPolicies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.playerLatencyPolicies = mapped
    }

    /**
     * @param argument One or more policies used to choose fleet based on player latency. See below.
     */
    @JvmName("oisrrwbsfpwujibh")
    public suspend fun playerLatencyPolicies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GameSessionQueuePlayerLatencyPolicyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.playerLatencyPolicies = mapped
    }

    /**
     * @param argument One or more policies used to choose fleet based on player latency. See below.
     */
    @JvmName("ngtljmpmmthhxlxf")
    public suspend fun playerLatencyPolicies(vararg argument: suspend GameSessionQueuePlayerLatencyPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GameSessionQueuePlayerLatencyPolicyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.playerLatencyPolicies = mapped
    }

    /**
     * @param argument One or more policies used to choose fleet based on player latency. See below.
     */
    @JvmName("meqehlvdgbjxoeyc")
    public suspend fun playerLatencyPolicies(argument: suspend GameSessionQueuePlayerLatencyPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GameSessionQueuePlayerLatencyPolicyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.playerLatencyPolicies = mapped
    }

    /**
     * @param values One or more policies used to choose fleet based on player latency. See below.
     */
    @JvmName("obrrifaoavvdvbfo")
    public suspend fun playerLatencyPolicies(vararg values: GameSessionQueuePlayerLatencyPolicyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.playerLatencyPolicies = mapped
    }

    /**
     * @param value Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("btkcfdorbjdctyhy")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("yybwlikwdwsvvpxq")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Maximum time a game session request can remain in the queue.
     */
    @JvmName("fyecgqdmrgkxlpbv")
    public suspend fun timeoutInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeoutInSeconds = mapped
    }

    internal fun build(): GameSessionQueueArgs = GameSessionQueueArgs(
        customEventData = customEventData,
        destinations = destinations,
        name = name,
        notificationTarget = notificationTarget,
        playerLatencyPolicies = playerLatencyPolicies,
        tags = tags,
        timeoutInSeconds = timeoutInSeconds,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy