Class CfnScript

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:56.913Z") @Stability(Stable) public class CfnScript extends CfnResource implements IInspectable
A CloudFormation 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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnScriptProps props)
      Create a new AWS::GameLift::Script.

      Parameters:
      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.
  • 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.
    • getAttrId

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

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

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

      @Stability(Stable) @NotNull public Object 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 ObjectVersion parameter to specify an earlier version.

    • 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.

      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.

    • 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.

      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.

    • getName

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

      Script names do not need to be unique.

    • setName

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

      Script names do not need to be unique.

    • getVersion

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

      Version strings do not need to be unique.

    • setVersion

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

      Version strings do not need to be unique.