Class: Google::Apis::OsconfigV1alpha::OsPolicyResourceExecResourceExec

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/osconfig_v1alpha/classes.rb,
lib/google/apis/osconfig_v1alpha/representations.rb,
lib/google/apis/osconfig_v1alpha/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.



1531
1532
1533
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1531

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>)


1506
1507
1508
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1506

def args
  @args
end

#fileGoogle::Apis::OsconfigV1alpha::OsPolicyResourceFile

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



1511
1512
1513
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1511

def file
  @file
end

#interpreterString

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

Returns:

  • (String)


1516
1517
1518
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1516

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 100K bytes. Corresponds to the JSON property outputFilePath

Returns:

  • (String)


1524
1525
1526
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1524

def output_file_path
  @output_file_path
end

#scriptString

An inline script. The size of the script is limited to 1024 characters. Corresponds to the JSON property script

Returns:

  • (String)


1529
1530
1531
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1529

def script
  @script
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1536
1537
1538
1539
1540
1541
1542
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1536

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