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

software.amazon.awscdk.services.gamelift.alpha.GameSessionQueue Maven / Gradle / Ivy

There is a newer version: 2.170.0-alpha.0
Show newest version
package software.amazon.awscdk.services.gamelift.alpha;

/**
 * (experimental) The GameSessionQueue resource creates a placement queue that processes requests for new game sessions.
 * 

* A queue uses FleetIQ algorithms to determine the best placement locations and find an available game server, then prompts the game server to start a new game session. * Queues can have destinations (GameLift fleets or gameSessionQueuees), which determine where the queue can place new game sessions. * A queue can have destinations with varied fleet type (Spot and On-Demand), instance type, and AWS Region. *

* Example: *

*

 * BuildFleet fleet;
 * Alias alias;
 * GameSessionQueue queue = GameSessionQueue.Builder.create(this, "GameSessionQueue")
 *         .gameSessionQueueName("my-queue-name")
 *         .destinations(List.of(fleet))
 *         .build();
 * queue.addDestination(alias);
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.102.0 (build e354887)", date = "2024-08-23T05:56:25.508Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.gamelift.alpha.$Module.class, fqn = "@aws-cdk/aws-gamelift-alpha.GameSessionQueue") public class GameSessionQueue extends software.amazon.awscdk.services.gamelift.alpha.GameSessionQueueBase { protected GameSessionQueue(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected GameSessionQueue(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param scope This parameter is required. * @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public GameSessionQueue(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.GameSessionQueueProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * (experimental) Import an existing gameSessionQueue from its ARN. *

* @param scope This parameter is required. * @param id This parameter is required. * @param gameSessionQueueArn This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IGameSessionQueue fromGameSessionQueueArn(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String gameSessionQueueArn) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.GameSessionQueue.class, "fromGameSessionQueueArn", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IGameSessionQueue.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(gameSessionQueueArn, "gameSessionQueueArn is required") }); } /** * (experimental) Import an existing gameSessionQueue from its attributes. *

* @param scope This parameter is required. * @param id This parameter is required. * @param attrs This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IGameSessionQueue fromGameSessionQueueAttributes(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.GameSessionQueueAttributes attrs) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.GameSessionQueue.class, "fromGameSessionQueueAttributes", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IGameSessionQueue.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(attrs, "attrs is required") }); } /** * (experimental) Import an existing gameSessionQueue from its name. *

* @param scope This parameter is required. * @param id This parameter is required. * @param gameSessionQueueName This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IGameSessionQueue fromGameSessionQueueName(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String gameSessionQueueName) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.GameSessionQueue.class, "fromGameSessionQueueName", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IGameSessionQueue.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(gameSessionQueueName, "gameSessionQueueName is required") }); } /** * (experimental) Adds a destination to fulfill requests for new game sessions. *

* @param destination A destination to add. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void addDestination(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IGameSessionQueueDestination destination) { software.amazon.jsii.Kernel.call(this, "addDestination", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(destination, "destination is required") }); } /** * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) protected @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.gamelift.CfnGameSessionQueue.FilterConfigurationProperty parseFilterConfiguration(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.GameSessionQueueProps props) { return software.amazon.jsii.Kernel.call(this, "parseFilterConfiguration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.CfnGameSessionQueue.FilterConfigurationProperty.class), new Object[] { java.util.Objects.requireNonNull(props, "props is required") }); } /** * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) protected @org.jetbrains.annotations.Nullable java.util.List parsePlayerLatencyPolicies(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.GameSessionQueueProps props) { return java.util.Optional.ofNullable((java.util.List)(software.amazon.jsii.Kernel.call(this, "parsePlayerLatencyPolicies", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.CfnGameSessionQueue.PlayerLatencyPolicyProperty.class)), new Object[] { java.util.Objects.requireNonNull(props, "props is required") }))).map(java.util.Collections::unmodifiableList).orElse(null); } /** * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) protected @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.gamelift.CfnGameSessionQueue.PriorityConfigurationProperty parsePriorityConfiguration(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.GameSessionQueueProps props) { return software.amazon.jsii.Kernel.call(this, "parsePriorityConfiguration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.CfnGameSessionQueue.PriorityConfigurationProperty.class), new Object[] { java.util.Objects.requireNonNull(props, "props is required") }); } /** * (experimental) The ARN of the gameSessionQueue. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getGameSessionQueueArn() { return software.amazon.jsii.Kernel.get(this, "gameSessionQueueArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) The Identifier of the gameSessionQueue. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getGameSessionQueueName() { return software.amazon.jsii.Kernel.get(this, "gameSessionQueueName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.gamelift.alpha.GameSessionQueue}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final software.amazon.awscdk.services.gamelift.alpha.GameSessionQueueProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new software.amazon.awscdk.services.gamelift.alpha.GameSessionQueueProps.Builder(); } /** * (experimental) A list of fleets and/or fleet alias that can be used to fulfill game session placement requests in the queue. *

* Destinations are listed in order of placement preference. *

* @return {@code this} * @param destinations A list of fleets and/or fleet alias that can be used to fulfill game session placement requests in the queue. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder destinations(final java.util.List destinations) { this.props.destinations(destinations); return this; } /** * (experimental) Name of this gameSessionQueue. *

* @return {@code this} * @param gameSessionQueueName Name of this gameSessionQueue. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder gameSessionQueueName(final java.lang.String gameSessionQueueName) { this.props.gameSessionQueueName(gameSessionQueueName); return this; } /** * (experimental) A list of locations where a queue is allowed to place new game sessions. *

* Locations are specified in the form of AWS Region codes, such as us-west-2. *

* For queues that have multi-location fleets, you can use a filter configuration allow placement with some, but not all of these locations. *

* Default: game sessions can be placed in any queue location *

* @return {@code this} * @param allowedLocations A list of locations where a queue is allowed to place new game sessions. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder allowedLocations(final java.util.List allowedLocations) { this.props.allowedLocations(allowedLocations); return this; } /** * (experimental) Information to be added to all events that are related to this game session queue. *

* Default: no customer event data *

* @return {@code this} * @param customEventData Information to be added to all events that are related to this game session queue. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder customEventData(final java.lang.String customEventData) { this.props.customEventData(customEventData); return this; } /** * (experimental) An SNS topic is set up to receive game session placement notifications. *

* Default: no notification *

* @return {@code this} * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html * @param notificationTarget An SNS topic is set up to receive game session placement notifications. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder notificationTarget(final software.amazon.awscdk.services.sns.ITopic notificationTarget) { this.props.notificationTarget(notificationTarget); return this; } /** * (experimental) A set of policies that act as a sliding cap on player latency. *

* FleetIQ works to deliver low latency for most players in a game session. * These policies ensure that no individual player can be placed into a game with unreasonably high latency. * Use multiple policies to gradually relax latency requirements a step at a time. * Multiple policies are applied based on their maximum allowed latency, starting with the lowest value. *

* Default: no player latency policy *

* @return {@code this} * @param playerLatencyPolicies A set of policies that act as a sliding cap on player latency. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder playerLatencyPolicies(final java.util.List playerLatencyPolicies) { this.props.playerLatencyPolicies(playerLatencyPolicies); return this; } /** * (experimental) Custom settings to use when prioritizing destinations and locations for game session placements. *

* This configuration replaces the FleetIQ default prioritization process. *

* Priority types that are not explicitly named will be automatically applied at the end of the prioritization process. *

* Default: no priority configuration *

* @return {@code this} * @param priorityConfiguration Custom settings to use when prioritizing destinations and locations for game session placements. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder priorityConfiguration(final software.amazon.awscdk.services.gamelift.alpha.PriorityConfiguration priorityConfiguration) { this.props.priorityConfiguration(priorityConfiguration); return this; } /** * (experimental) The maximum time, that a new game session placement request remains in the queue. *

* When a request exceeds this time, the game session placement changes to a TIMED_OUT status. *

* Default: 50 seconds *

* @return {@code this} * @param timeout The maximum time, that a new game session placement request remains in the queue. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder timeout(final software.amazon.awscdk.Duration timeout) { this.props.timeout(timeout); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.gamelift.alpha.GameSessionQueue}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.gamelift.alpha.GameSessionQueue build() { return new software.amazon.awscdk.services.gamelift.alpha.GameSessionQueue( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy