Class CfnScript

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.552Z") @Stability(Stable) public class CfnScript extends CfnResource implements IInspectable, 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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The unique Amazon Resource Name (ARN) for the script.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String 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

      @Stability(Stable) @NotNull public String getAttrId()
      A unique identifier for a Realtime script.
    • getAttrSizeOnDisk

      @Stability(Stable) @NotNull public Number 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

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getStorageLocation

      @Stability(Stable) @NotNull public Object getStorageLocation()
      The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.
    • setStorageLocation

      @Stability(Stable) public void setStorageLocation(@NotNull IResolvable value)
      The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.
    • setStorageLocation

      @Stability(Stable) public void setStorageLocation(@NotNull CfnScript.S3LocationProperty value)
      The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.
    • getName

      @Stability(Stable) @Nullable public String getName()
      A descriptive label that is associated with a script.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      A descriptive label that is associated with a script.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      A list of labels to assign to the new script resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      A list of labels to assign to the new script resource.
    • getVersion

      @Stability(Stable) @Nullable public String getVersion()
      The version that is associated with a build or script.
    • setVersion

      @Stability(Stable) public void setVersion(@Nullable String value)
      The version that is associated with a build or script.