Class: AWSCDK::Deadline::CfnFleet::HostConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(script_body:, script_timeout_seconds: nil) ⇒ HostConfigurationProperty

Returns a new instance of HostConfigurationProperty.

Parameters:

  • script_body (String)

    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, nil) (defaults to: nil)

    The maximum time that the host configuration can run.



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_bodyString (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 root on Linux, as an Administrator on Windows).



1361
1362
1363
# File 'deadline/cfn_fleet.rb', line 1361

def script_body
  @script_body
end

#script_timeout_secondsNumeric? (readonly)

Note:

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_propertiesObject



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_jsiiObject



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