@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-07-01T09:58:30.940Z") 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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnScript(Construct scope,
java.lang.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 |
---|---|
java.lang.String |
getAttrArn()
The unique Amazon Resource Name (ARN) for the script.
|
java.lang.String |
getAttrId()
A unique identifier for a Realtime script.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getName()
A descriptive label that is associated with a script.
|
java.lang.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.
|
java.lang.String |
getVersion()
The version that is associated with a build or script.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setName(java.lang.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(java.lang.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, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnScript(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnScript(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnScript(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
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.
public java.lang.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.
public void setStorageLocation(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.
public void setStorageLocation(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.
public java.lang.String getName()
Script names do not need to be unique.
public void setName(java.lang.String value)
Script names do not need to be unique.
public java.lang.String getVersion()
Version strings do not need to be unique.
public void setVersion(java.lang.String value)
Version strings do not need to be unique.