Class CfnScript
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.gamelift.CfnScript
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggable,IScriptRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:06.739Z")
@Stability(Stable)
public class CfnScript
extends CfnResource
implements IInspectable, IScriptRef, ITaggable
The
AWS::GameLift::Script resource creates a new script record for your Realtime Servers script.
Realtime scripts are JavaScript that provide configuration settings and optional custom game logic for your game. The script is deployed when you create a Realtime Servers fleet to host your game sessions. Script logic is executed during an active game session.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.gamelift.*;
CfnScript cfnScript = CfnScript.Builder.create(this, "MyCfnScript")
.storageLocation(S3LocationProperty.builder()
.bucket("bucket")
.key("key")
.roleArn("roleArn")
// the properties below are optional
.objectVersion("objectVersion")
.build())
// the properties below are optional
.name("name")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.version("version")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnScript.static interfaceThe location in Amazon S3 where build or script files can be stored for access by Amazon GameLift.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.gamelift.IScriptRef
IScriptRef.Jsii$Default, IScriptRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnScript(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnScript(software.amazon.jsii.JsiiObjectRef objRef) CfnScript(software.constructs.Construct scope, String id, CfnScriptProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IScriptReffromScriptArn(software.constructs.Construct scope, String id, String arn) Creates a new IScriptRef from an ARN.static IScriptReffromScriptId(software.constructs.Construct scope, String id, String scriptId) Creates a new IScriptRef from a scriptId.The unique Amazon Resource Name (ARN) for the script.A time stamp indicating when this data object was created.A unique identifier for a Realtime script.The file size of the uploaded Realtime script, expressed in bytes.getName()A descriptive label that is associated with a script.A reference to a Script resource.The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.getTags()Tag Manager which manages the tags for this resource.A list of labels to assign to the new script resource.The version that is associated with a build or script.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidA descriptive label that is associated with a script.voidsetStorageLocation(IResolvable value) The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.voidThe location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.voidsetTagsRaw(List<CfnTag> value) A list of labels to assign to the new script resource.voidsetVersion(String value) The version that is associated with a build or script.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnScript
protected CfnScript(software.amazon.jsii.JsiiObjectRef objRef) -
CfnScript
protected CfnScript(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnScript
@Stability(Stable) public CfnScript(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnScriptProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
fromScriptArn
@Stability(Stable) @NotNull public static IScriptRef fromScriptArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IScriptRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromScriptId
@Stability(Stable) @NotNull public static IScriptRef fromScriptId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String scriptId) Creates a new IScriptRef from a scriptId.- Parameters:
scope- This parameter is required.id- This parameter is required.scriptId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The unique Amazon Resource Name (ARN) for the script. -
getAttrCreationTime
A time stamp indicating when this data object was created.Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"). -
getAttrId
A unique identifier for a Realtime script. -
getAttrSizeOnDisk
The file size of the uploaded Realtime script, expressed in bytes.When files are uploaded from an S3 location, this value remains at "0".
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getScriptRef
A reference to a Script resource.- Specified by:
getScriptRefin interfaceIScriptRef
-
getTags
Tag Manager which manages the tags for this resource. -
getStorageLocation
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.Returns union: either
IResolvableorCfnScript.S3LocationProperty -
setStorageLocation
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. -
setStorageLocation
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. -
getName
A descriptive label that is associated with a script. -
setName
A descriptive label that is associated with a script. -
getTagsRaw
A list of labels to assign to the new script resource. -
setTagsRaw
A list of labels to assign to the new script resource. -
getVersion
The version that is associated with a build or script. -
setVersion
The version that is associated with a build or script.
-