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.



1729
1730
1731
# File 'lib/google/apis/batch_v1/classes.rb', line 1729

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



1711
1712
1713
# File 'lib/google/apis/batch_v1/classes.rb', line 1711

def cloud_logging_option
  @cloud_logging_option
end

#destinationString

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

Returns:

  • (String)


1716
1717
1718
# File 'lib/google/apis/batch_v1/classes.rb', line 1716

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)


1727
1728
1729
# File 'lib/google/apis/batch_v1/classes.rb', line 1727

def logs_path
  @logs_path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1734
1735
1736
1737
1738
# File 'lib/google/apis/batch_v1/classes.rb', line 1734

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