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

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

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

/**
 * (experimental) A Amazon GameLift alias is used to abstract a fleet designation.
 * 

* Fleet designations tell GameLift where to search for available resources when creating new game sessions for players. * Use aliases instead of specific fleet IDs to seamlessly switch player traffic from one fleet to another by changing the alias's target location. *

* Aliases are useful in games that don't use queues. * Switching fleets in a queue is a simple matter of creating a new fleet, adding it to the queue, and removing the old fleet, none of which is visible to players. * In contrast, game clients that don't use queues must specify which fleet to use when communicating with the GameLift service. * Without aliases, a fleet switch requires updates to your game code and possibly distribution of an updated game clients to players. *

* When updating the fleet-id an alias points to, there is a transition period of up to 2 minutes where game sessions on the alias may end up on the old fleet. *

* Example: *

*

 * BuildFleet fleet;
 * // Add an alias to an existing fleet using a dedicated fleet method
 * Alias liveAlias = fleet.addAlias("live");
 * // You can also create a standalone alias
 * // You can also create a standalone alias
 * Alias.Builder.create(this, "TerminalAlias")
 *         .aliasName("terminal-alias")
 *         .terminalMessage("A terminal message")
 *         .build();
 * 
*

* @see https://docs.aws.amazon.com/gamelift/latest/developerguide/aliases-creating.html */ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-27T17:02:12.076Z") @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.Alias") public class Alias extends software.amazon.awscdk.services.gamelift.alpha.AliasBase { protected Alias(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected Alias(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 Alias(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.AliasProps 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 alias from its ARN. *

* @param scope This parameter is required. * @param id This parameter is required. * @param aliasArn 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.IAlias fromAliasArn(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 aliasArn) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Alias.class, "fromAliasArn", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IAlias.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(aliasArn, "aliasArn is required") }); } /** * (experimental) Import an existing alias 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.IAlias fromAliasAttributes(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.AliasAttributes attrs) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Alias.class, "fromAliasAttributes", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IAlias.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 alias from its identifier. *

* @param scope This parameter is required. * @param id This parameter is required. * @param aliasId 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.IAlias fromAliasId(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 aliasId) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Alias.class, "fromAliasId", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IAlias.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(aliasId, "aliasId is required") }); } /** * (experimental) The ARN of the alias. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getAliasArn() { return software.amazon.jsii.Kernel.get(this, "aliasArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) The Identifier of the alias. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getAliasId() { return software.amazon.jsii.Kernel.get(this, "aliasId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) A fleet that the alias points to. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.gamelift.alpha.IFleet getFleet() { return software.amazon.jsii.Kernel.get(this, "fleet", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IFleet.class)); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.gamelift.alpha.Alias}. */ @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.AliasProps.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.AliasProps.Builder(); } /** * (experimental) Name of this alias. *

* @return {@code this} * @param aliasName Name of this alias. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder aliasName(final java.lang.String aliasName) { this.props.aliasName(aliasName); return this; } /** * (experimental) A human-readable description of the alias. *

* Default: no description *

* @return {@code this} * @param description A human-readable description of the alias. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder description(final java.lang.String description) { this.props.description(description); return this; } /** * (experimental) A fleet that the alias points to. If specified, the alias resolves to one specific fleet. *

* At least one of fleet and terminalMessage must be provided. *

* Default: no fleet that the alias points to. *

* @return {@code this} * @param fleet A fleet that the alias points to. If specified, the alias resolves to one specific fleet. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder fleet(final software.amazon.awscdk.services.gamelift.alpha.IFleet fleet) { this.props.fleet(fleet); return this; } /** * (experimental) The message text to be used with a terminal routing strategy. *

* At least one of fleet and terminalMessage must be provided. *

* Default: no terminal message *

* @return {@code this} * @param terminalMessage The message text to be used with a terminal routing strategy. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder terminalMessage(final java.lang.String terminalMessage) { this.props.terminalMessage(terminalMessage); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.gamelift.alpha.Alias}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.gamelift.alpha.Alias build() { return new software.amazon.awscdk.services.gamelift.alpha.Alias( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy