Class: AWSCDK::Deadline::CfnFleet::HostConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Deadline::CfnFleet::HostConfigurationProperty
- Defined in:
- deadline/cfn_fleet.rb
Overview
Provides a script that runs as a worker is starting up that you can use to provide additional configuration for workers in your fleet.
To remove a script from a fleet, use the UpdateFleet operation with the host_configuration script_body parameter set to an empty string ("").
Instance Attribute Summary collapse
-
#script_body ⇒ String
readonly
The text of the script that runs as a worker is starting up that you can use to provide additional configuration for workers in your fleet.
-
#script_timeout_seconds ⇒ Numeric?
readonly
The maximum time that the host configuration can run.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(script_body:, script_timeout_seconds: nil) ⇒ HostConfigurationProperty
constructor
A new instance of HostConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(script_body:, script_timeout_seconds: nil) ⇒ HostConfigurationProperty
Returns a new instance of HostConfigurationProperty.
1344 1345 1346 1347 1348 1349 |
# File 'deadline/cfn_fleet.rb', line 1344 def initialize(script_body:, script_timeout_seconds: nil) @script_body = script_body Jsii::Type.check_type(@script_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scriptBody") @script_timeout_seconds = script_timeout_seconds Jsii::Type.check_type(@script_timeout_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scriptTimeoutSeconds") unless @script_timeout_seconds.nil? end |
Instance Attribute Details
#script_body ⇒ String (readonly)
The text of the script that runs as a worker is starting up that you can use to provide additional configuration for workers in your fleet.
The script runs after a worker enters the STARTING state and before the worker processes tasks.
For more information about using the script, see Run scripts as an administrator to configure workers in the Deadline Cloud Developer Guide .
The script runs as an administrative user (
sudo rooton Linux, as an Administrator on Windows).
1361 1362 1363 |
# File 'deadline/cfn_fleet.rb', line 1361 def script_body @script_body end |
#script_timeout_seconds ⇒ Numeric? (readonly)
Default: - 300
The maximum time that the host configuration can run.
If the timeout expires, the worker enters the NOT RESPONDING state and shuts down. You are charged for the time that the worker is running the host configuration script.
You should configure your fleet for a maximum of one worker while testing your host configuration script to avoid starting additional workers.
The default is 300 seconds (5 minutes).
1373 1374 1375 |
# File 'deadline/cfn_fleet.rb', line 1373 def script_timeout_seconds @script_timeout_seconds end |
Class Method Details
.jsii_properties ⇒ Object
1375 1376 1377 1378 1379 1380 |
# File 'deadline/cfn_fleet.rb', line 1375 def self.jsii_properties { :script_body => "scriptBody", :script_timeout_seconds => "scriptTimeoutSeconds", } end |
Instance Method Details
#to_jsii ⇒ Object
1382 1383 1384 1385 1386 1387 1388 1389 |
# File 'deadline/cfn_fleet.rb', line 1382 def to_jsii result = {} result.merge!({ "scriptBody" => @script_body, "scriptTimeoutSeconds" => @script_timeout_seconds, }) result.compact end |