From 8690a75447e67f19cd3fb14368cab12af0c5bfd1 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Mon, 13 Nov 2023 14:44:45 -0800 Subject: [PATCH] feat: add a CloudLoggingOption and use_generic_task_monitored_resource fields for users to opt out new batch monitored resource in cloud logging PiperOrigin-RevId: 582090179 --- google/cloud/batch/v1alpha/job.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/google/cloud/batch/v1alpha/job.proto b/google/cloud/batch/v1alpha/job.proto index b16094126e182..76ffdecaefc33 100644 --- a/google/cloud/batch/v1alpha/job.proto +++ b/google/cloud/batch/v1alpha/job.proto @@ -114,6 +114,15 @@ message Job { // LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be // preserved. message LogsPolicy { + // CloudLoggingOption contains additional settings for cloud logging generated + // by Batch job. + message CloudLoggingOption { + // Optional. Set this flag to true to use generic_task as monitored resource + // for Batch job generated cloud logging. + bool use_generic_task_monitored_resource = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + // The destination (if any) for logs. enum Destination { // Logs are not preserved. @@ -133,6 +142,11 @@ message LogsPolicy { // local file path on the VM, or under the mount point of a Persistent Disk or // Filestore, or a Cloud Storage path. string logs_path = 2; + + // Optional. Additional settings for Cloud Logging. It will only take effect + // when the destination of LogsPolicy is set to CLOUD_LOGGING. + CloudLoggingOption cloud_logging_option = 3 + [(google.api.field_behavior) = OPTIONAL]; } // JobDependency describes the state of other Jobs that the start of this Job