Class: Google::Apis::BatchV1::AgentScript
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::AgentScript
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb
Overview
Script runnable representation on the agent side.
Instance Attribute Summary collapse
-
#path ⇒ String
Script file path on the host VM.
-
#text ⇒ String
Shell script text.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AgentScript
constructor
A new instance of AgentScript.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AgentScript
Returns a new instance of AgentScript.
339 340 341 |
# File 'lib/google/apis/batch_v1/classes.rb', line 339 def initialize(**args) update!(**args) end |
Instance Attribute Details
#path ⇒ String
Script file path on the host VM. To specify an interpreter, please add a #!
(
also known as shebang line) as
the first line of the file.(For example, to execute the script using bash, #!/
bin/bash
should be the first line of the file. To execute the script using
Python3
, #!/usr/bin/env python3
should be the first line of the file.)
Otherwise, the file will by default be executed by /bin/sh
.
Corresponds to the JSON property path
328 329 330 |
# File 'lib/google/apis/batch_v1/classes.rb', line 328 def path @path end |
#text ⇒ String
Shell script text. To specify an interpreter, please add a #!\n
at the
beginning of the text.(For example, to execute the script using bash, #!/bin/
bash\n
should be added. To execute the script usingPython3
, #!/usr/bin/env
python3\n
should be added.) Otherwise, the script will by default be executed
by /bin/sh
.
Corresponds to the JSON property text
337 338 339 |
# File 'lib/google/apis/batch_v1/classes.rb', line 337 def text @text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
344 345 346 347 |
# File 'lib/google/apis/batch_v1/classes.rb', line 344 def update!(**args) @path = args[:path] if args.key?(:path) @text = args[:text] if args.key?(:text) end |