@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.495Z") @Stability(value=Stable) public class CfnScript extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnScript.Builder
A fluent builder for
CfnScript. |
static interface |
CfnScript.S3LocationProperty
The location in Amazon S3 where build or script files can be stored for access by Amazon GameLift.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnScript(software.constructs.Construct scope,
String id,
CfnScriptProps props)
Create a new `AWS::GameLift::Script`.
|
protected |
CfnScript(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnScript(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
The unique Amazon Resource Name (ARN) for the script.
|
String |
getAttrId()
A unique identifier for a Realtime script.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getName()
A descriptive label that is associated with a script.
|
Object |
getStorageLocation()
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.
|
TagManager |
getTags()
A list of labels to assign to the new script resource.
|
String |
getVersion()
The version that is associated with a build or script.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setName(String value)
A descriptive label that is associated with a script.
|
void |
setStorageLocation(CfnScript.S3LocationProperty value)
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.
|
void |
setStorageLocation(IResolvable value)
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.
|
void |
setVersion(String value)
The version that is associated with a build or script.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnScript(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnScript(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnScript(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnScriptProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public String getAttrId()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
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.
@Stability(value=Stable) @NotNull public Object getStorageLocation()
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 ObjectVersion parameter to specify an earlier version.
@Stability(value=Stable)
public void setStorageLocation(@NotNull
CfnScript.S3LocationProperty value)
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 ObjectVersion parameter to specify an earlier version.
@Stability(value=Stable)
public void setStorageLocation(@NotNull
IResolvable value)
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 ObjectVersion parameter to specify an earlier version.
@Stability(value=Stable) @Nullable public String getName()
Script names do not need to be unique.
@Stability(value=Stable)
public void setName(@Nullable
String value)
Script names do not need to be unique.
@Stability(value=Stable) @Nullable public String getVersion()
Version strings do not need to be unique.
@Stability(value=Stable)
public void setVersion(@Nullable
String value)
Version strings do not need to be unique.
Copyright © 2022. All rights reserved.