Class: Google::Apis::OsconfigV1::OsPolicyResourceExecResourceExec

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

Overview

A file or script to execute.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OsPolicyResourceExecResourceExec

Returns a new instance of OsPolicyResourceExecResourceExec.



1934
1935
1936
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1934

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

Instance Attribute Details

#argsArray<String>

Optional arguments to pass to the source during execution. Corresponds to the JSON property args

Returns:

  • (Array<String>)


1909
1910
1911
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1909

def args
  @args
end

#fileGoogle::Apis::OsconfigV1::OsPolicyResourceFile

A remote or local file. Corresponds to the JSON property file



1914
1915
1916
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1914

def file
  @file
end

#interpreterString

Required. The script interpreter to use. Corresponds to the JSON property interpreter

Returns:

  • (String)


1919
1920
1921
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1919

def interpreter
  @interpreter
end

#output_file_pathString

Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 500K bytes. Corresponds to the JSON property outputFilePath

Returns:

  • (String)


1927
1928
1929
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1927

def output_file_path
  @output_file_path
end

#scriptString

An inline script. The size of the script is limited to 32KiB. Corresponds to the JSON property script

Returns:

  • (String)


1932
1933
1934
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1932

def script
  @script
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1939
1940
1941
1942
1943
1944
1945
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1939

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