Class: Google::Apis::BatchV1::LogsPolicy
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::LogsPolicy
- 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
-
#cloud_logging_option ⇒ Google::Apis::BatchV1::CloudLoggingOption
CloudLoggingOptioncontains additional settings for Cloud Logging logs generated by Batch job. -
#destination ⇒ String
If and where logs should be saved.
-
#logs_path ⇒ String
When
destinationis set toPATH, you must set this field to the path where you want logs to be saved.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LogsPolicy
constructor
A new instance of LogsPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LogsPolicy
Returns a new instance of LogsPolicy.
1774 1775 1776 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1774 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cloud_logging_option ⇒ Google::Apis::BatchV1::CloudLoggingOption
CloudLoggingOption contains additional settings for Cloud Logging logs
generated by Batch job.
Corresponds to the JSON property cloudLoggingOption
1756 1757 1758 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1756 def cloud_logging_option @cloud_logging_option end |
#destination ⇒ String
If and where logs should be saved.
Corresponds to the JSON property destination
1761 1762 1763 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1761 def destination @destination end |
#logs_path ⇒ String
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
1772 1773 1774 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1772 def logs_path @logs_path end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1779 1780 1781 1782 1783 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1779 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 |