Class: Google::Apis::BatchV1::LogsPolicy

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

LogsPolicy describes if and how a job's logs are preserved. Logs include information that is automatically written by the Batch service agent and any information that you configured the job's runnables to write to the stdout or stderr streams.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LogsPolicy

Returns a new instance of LogsPolicy.



1766
1767
1768
# File 'lib/google/apis/batch_v1/classes.rb', line 1766

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

Instance Attribute Details

#cloud_logging_optionGoogle::Apis::BatchV1::CloudLoggingOption

CloudLoggingOption contains additional settings for Cloud Logging logs generated by Batch job. Corresponds to the JSON property cloudLoggingOption



1748
1749
1750
# File 'lib/google/apis/batch_v1/classes.rb', line 1748

def cloud_logging_option
  @cloud_logging_option
end

#destinationString

If and where logs should be saved. Corresponds to the JSON property destination

Returns:

  • (String)


1753
1754
1755
# File 'lib/google/apis/batch_v1/classes.rb', line 1753

def destination
  @destination
end

#logs_pathString

When destination is set to PATH, you must set this field to the path where you want logs to be saved. This path can point to a local directory on the VM or (if congifured) a directory under the mount path of any Cloud Storage bucket, network file system (NFS), or writable persistent disk that is mounted to the job. For example, if the job has a bucket with mountPath set to /mnt/ disks/my-bucket, you can write logs to the root directory of the remotePath of that bucket by setting this field to /mnt/disks/my-bucket/. Corresponds to the JSON property logsPath

Returns:

  • (String)


1764
1765
1766
# File 'lib/google/apis/batch_v1/classes.rb', line 1764

def logs_path
  @logs_path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1771
1772
1773
1774
1775
# File 'lib/google/apis/batch_v1/classes.rb', line 1771

def update!(**args)
  @cloud_logging_option = args[:cloud_logging_option] if args.key?(:cloud_logging_option)
  @destination = args[:destination] if args.key?(:destination)
  @logs_path = args[:logs_path] if args.key?(:logs_path)
end