Class: Google::Apis::OsconfigV1beta::SoftwareRecipeStepRunScript

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/osconfig_v1beta/classes.rb,
lib/google/apis/osconfig_v1beta/representations.rb,
lib/google/apis/osconfig_v1beta/representations.rb

Overview

Runs a script through an interpreter.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SoftwareRecipeStepRunScript

Returns a new instance of SoftwareRecipeStepRunScript.



2201
2202
2203
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2201

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#allowed_exit_codesArray<Fixnum>

Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0] Corresponds to the JSON property allowedExitCodes

Returns:

  • (Array<Fixnum>)


2187
2188
2189
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2187

def allowed_exit_codes
  @allowed_exit_codes
end

#interpreterString

The script interpreter to use to run the script. If no interpreter is specified the script is executed directly, which likely only succeed for scripts with shebang lines. Corresponds to the JSON property interpreter

Returns:

  • (String)


2194
2195
2196
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2194

def interpreter
  @interpreter
end

#scriptString

Required. The shell script to be executed. Corresponds to the JSON property script

Returns:

  • (String)


2199
2200
2201
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2199

def script
  @script
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2206
2207
2208
2209
2210
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 2206

def update!(**args)
  @allowed_exit_codes = args[:allowed_exit_codes] if args.key?(:allowed_exit_codes)
  @interpreter = args[:interpreter] if args.key?(:interpreter)
  @script = args[:script] if args.key?(:script)
end