Class: AWSCDK::GameLift::CfnScriptProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GameLift::CfnScriptProps
- Defined in:
- game_lift/cfn_script_props.rb
Overview
Properties for defining a CfnScript.
Instance Attribute Summary collapse
-
#name ⇒ String?
readonly
A descriptive label that is associated with a script.
-
#node_js_version ⇒ String?
readonly
The Node.js version used for execution of the Realtime script.
-
#storage_location ⇒ AWSCDK::IResolvable, AWSCDK::GameLift::CfnScript::S3LocationProperty
readonly
The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A list of labels to assign to the new script resource.
-
#version ⇒ String?
readonly
The version that is associated with a build or script.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(storage_location:, name: nil, node_js_version: nil, tags: nil, version: nil) ⇒ CfnScriptProps
constructor
A new instance of CfnScriptProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(storage_location:, name: nil, node_js_version: nil, tags: nil, version: nil) ⇒ CfnScriptProps
Returns a new instance of CfnScriptProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'game_lift/cfn_script_props.rb', line 14 def initialize(storage_location:, name: nil, node_js_version: nil, tags: nil, version: nil) @storage_location = storage_location.is_a?(Hash) ? ::AWSCDK::GameLift::CfnScript::S3LocationProperty.new(**storage_location.transform_keys(&:to_sym)) : storage_location Jsii::Type.check_type(@storage_location, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nYW1lbGlmdC5DZm5TY3JpcHQuUzNMb2NhdGlvblByb3BlcnR5In1dfX0=")), "storageLocation") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @node_js_version = node_js_version Jsii::Type.check_type(@node_js_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nodeJsVersion") unless @node_js_version.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @version = version Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless @version.nil? end |
Instance Attribute Details
#name ⇒ String? (readonly)
A descriptive label that is associated with a script.
Script names do not need to be unique.
40 41 42 |
# File 'game_lift/cfn_script_props.rb', line 40 def name @name end |
#node_js_version ⇒ String? (readonly)
The Node.js version used for execution of the Realtime script.
45 46 47 |
# File 'game_lift/cfn_script_props.rb', line 45 def node_js_version @node_js_version end |
#storage_location ⇒ AWSCDK::IResolvable, AWSCDK::GameLift::CfnScript::S3LocationProperty (readonly)
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 Servers 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 Servers 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.
33 34 35 |
# File 'game_lift/cfn_script_props.rb', line 33 def storage_location @storage_location end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
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.
52 53 54 |
# File 'game_lift/cfn_script_props.rb', line 52 def @tags end |
#version ⇒ String? (readonly)
The version that is associated with a build or script.
Version strings do not need to be unique.
59 60 61 |
# File 'game_lift/cfn_script_props.rb', line 59 def version @version end |
Class Method Details
.jsii_properties ⇒ Object
61 62 63 64 65 66 67 68 69 |
# File 'game_lift/cfn_script_props.rb', line 61 def self.jsii_properties { :storage_location => "storageLocation", :name => "name", :node_js_version => "nodeJsVersion", :tags => "tags", :version => "version", } end |
Instance Method Details
#to_jsii ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 |
# File 'game_lift/cfn_script_props.rb', line 71 def to_jsii result = {} result.merge!({ "storageLocation" => @storage_location, "name" => @name, "nodeJsVersion" => @node_js_version, "tags" => @tags, "version" => @version, }) result.compact end |