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

software.amazon.awscdk.services.gamelift.alpha.Script 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 GameLift script, that is installed and runs on instances in an Amazon GameLift fleet.
 * 

* It consists of * a zip file with all of the components of the realtime game server script. *

* Example: *

*

 * Bucket bucket;
 * Script.Builder.create(this, "Script")
 *         .content(Content.fromBucket(bucket, "sample-asset-key"))
 *         .build();
 * 
*

* @see https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script-uploading.html */ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-27T17:02:12.142Z") @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.Script") public class Script extends software.amazon.awscdk.services.gamelift.alpha.ScriptBase { protected Script(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected Script(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 Script(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.ScriptProps 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) Create a new realtime server script from asset content. *

* @param scope This parameter is required. * @param id This parameter is required. * @param path This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.Script fromAsset(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 path, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.assets.AssetOptions options) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Script.class, "fromAsset", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.Script.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(path, "path is required"), options }); } /** * (experimental) Create a new realtime server script from asset content. *

* @param scope This parameter is required. * @param id This parameter is required. * @param path 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.Script fromAsset(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 path) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Script.class, "fromAsset", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.Script.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(path, "path is required") }); } /** * (experimental) Create a new realtime server script from s3 content. *

* @param scope This parameter is required. * @param id This parameter is required. * @param bucket This parameter is required. * @param key This parameter is required. * @param objectVersion */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.Script fromBucket(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.s3.IBucket bucket, final @org.jetbrains.annotations.NotNull java.lang.String key, final @org.jetbrains.annotations.Nullable java.lang.String objectVersion) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Script.class, "fromBucket", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.Script.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(bucket, "bucket is required"), java.util.Objects.requireNonNull(key, "key is required"), objectVersion }); } /** * (experimental) Create a new realtime server script from s3 content. *

* @param scope This parameter is required. * @param id This parameter is required. * @param bucket This parameter is required. * @param key 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.Script fromBucket(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.s3.IBucket bucket, final @org.jetbrains.annotations.NotNull java.lang.String key) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Script.class, "fromBucket", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.Script.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(bucket, "bucket is required"), java.util.Objects.requireNonNull(key, "key is required") }); } /** * (experimental) Import a script into CDK using its ARN. *

* @param scope This parameter is required. * @param id This parameter is required. * @param scriptArn 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.IScript fromScriptArn(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 scriptArn) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Script.class, "fromScriptArn", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IScript.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(scriptArn, "scriptArn is required") }); } /** * (experimental) Import an existing realtime server script 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.IScript fromScriptAttributes(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.ScriptAttributes attrs) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Script.class, "fromScriptAttributes", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IScript.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) The principal this GameLift script is using. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IPrincipal getGrantPrincipal() { return software.amazon.jsii.Kernel.get(this, "grantPrincipal", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IPrincipal.class)); } /** * (experimental) The IAM role GameLift assumes to acccess server script content. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IRole getRole() { return software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class)); } /** * (experimental) The ARN of the realtime server script. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getScriptArn() { return software.amazon.jsii.Kernel.get(this, "scriptArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) The Identifier of the realtime server script. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getScriptId() { return software.amazon.jsii.Kernel.get(this, "scriptId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.gamelift.alpha.Script}. */ @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.ScriptProps.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.ScriptProps.Builder(); } /** * (experimental) The game content. *

* @return {@code this} * @param content The game content. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder content(final software.amazon.awscdk.services.gamelift.alpha.Content content) { this.props.content(content); return this; } /** * (experimental) The IAM role assumed by GameLift to access server script in S3. *

* If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions * to have Read access to a specific key content into a specific S3 bucket. * Below an example of required permission: * { * "Version": "2012-10-17", * "Statement": [{ * "Effect": "Allow", * "Action": [ * "s3:GetObject", * "s3:GetObjectVersion" * ], * "Resource": "arn:aws:s3:::bucket-name/object-name" * }] * } *

* Default: - a role will be created with default permissions. *

* @return {@code this} * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc * @param role The IAM role assumed by GameLift to access server script in S3. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder role(final software.amazon.awscdk.services.iam.IRole role) { this.props.role(role); return this; } /** * (experimental) Name of this realtime server script. *

* Default: No name *

* @return {@code this} * @param scriptName Name of this realtime server script. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder scriptName(final java.lang.String scriptName) { this.props.scriptName(scriptName); return this; } /** * (experimental) Version of this realtime server script. *

* Default: No version *

* @return {@code this} * @param scriptVersion Version of this realtime server script. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder scriptVersion(final java.lang.String scriptVersion) { this.props.scriptVersion(scriptVersion); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.gamelift.alpha.Script}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.gamelift.alpha.Script build() { return new software.amazon.awscdk.services.gamelift.alpha.Script( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy