Class CfnScript
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::GameLift::Script.
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();
-
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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe unique Amazon Resource Name (ARN) for the script.A unique identifier for a Realtime script.getName()A descriptive label that is associated with a script.The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.getTags()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.voidsetVersion(String value) The version that is associated with a build or script.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @NotNull CfnScriptProps props) Create a newAWS::GameLift::Script.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
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. -
getAttrId
A unique identifier for a Realtime script. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
A list of labels to assign to the new script resource.Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference . Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.
-
getStorageLocation
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the
ObjectVersionparameter to specify an earlier version. -
setStorageLocation
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the
ObjectVersionparameter to specify an earlier version. -
setStorageLocation
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the
ObjectVersionparameter to specify an earlier version. -
getName
A descriptive label that is associated with a script.Script names do not need to be unique.
-
setName
A descriptive label that is associated with a script.Script names do not need to be unique.
-
getVersion
The version that is associated with a build or script.Version strings do not need to be unique.
-
setVersion
The version that is associated with a build or script.Version strings do not need to be unique.
-