1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.logging.v2; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/annotations.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "google/api/client.proto"; 21*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto"; 22*d5c09012SAndroid Build Coastguard Workerimport "google/api/monitored_resource.proto"; 23*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto"; 24*d5c09012SAndroid Build Coastguard Workerimport "google/logging/v2/log_entry.proto"; 25*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/duration.proto"; 26*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/empty.proto"; 27*d5c09012SAndroid Build Coastguard Workerimport "google/rpc/status.proto"; 28*d5c09012SAndroid Build Coastguard Worker 29*d5c09012SAndroid Build Coastguard Workeroption cc_enable_arenas = true; 30*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.Logging.V2"; 31*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/logging/apiv2/loggingpb;loggingpb"; 32*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 33*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "LoggingProto"; 34*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.logging.v2"; 35*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\Logging\\V2"; 36*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::Logging::V2"; 37*d5c09012SAndroid Build Coastguard Worker 38*d5c09012SAndroid Build Coastguard Worker// Service for ingesting and querying logs. 39*d5c09012SAndroid Build Coastguard Workerservice LoggingServiceV2 { 40*d5c09012SAndroid Build Coastguard Worker option (google.api.default_host) = "logging.googleapis.com"; 41*d5c09012SAndroid Build Coastguard Worker option (google.api.oauth_scopes) = 42*d5c09012SAndroid Build Coastguard Worker "https://www.googleapis.com/auth/cloud-platform," 43*d5c09012SAndroid Build Coastguard Worker "https://www.googleapis.com/auth/cloud-platform.read-only," 44*d5c09012SAndroid Build Coastguard Worker "https://www.googleapis.com/auth/logging.admin," 45*d5c09012SAndroid Build Coastguard Worker "https://www.googleapis.com/auth/logging.read," 46*d5c09012SAndroid Build Coastguard Worker "https://www.googleapis.com/auth/logging.write"; 47*d5c09012SAndroid Build Coastguard Worker 48*d5c09012SAndroid Build Coastguard Worker // Deletes all the log entries in a log for the _Default Log Bucket. The log 49*d5c09012SAndroid Build Coastguard Worker // reappears if it receives new entries. Log entries written shortly before 50*d5c09012SAndroid Build Coastguard Worker // the delete operation might not be deleted. Entries received after the 51*d5c09012SAndroid Build Coastguard Worker // delete operation with a timestamp before the operation will be deleted. 52*d5c09012SAndroid Build Coastguard Worker rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { 53*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 54*d5c09012SAndroid Build Coastguard Worker delete: "/v2/{log_name=projects/*/logs/*}" 55*d5c09012SAndroid Build Coastguard Worker additional_bindings { delete: "/v2/{log_name=*/*/logs/*}" } 56*d5c09012SAndroid Build Coastguard Worker additional_bindings { delete: "/v2/{log_name=organizations/*/logs/*}" } 57*d5c09012SAndroid Build Coastguard Worker additional_bindings { delete: "/v2/{log_name=folders/*/logs/*}" } 58*d5c09012SAndroid Build Coastguard Worker additional_bindings { delete: "/v2/{log_name=billingAccounts/*/logs/*}" } 59*d5c09012SAndroid Build Coastguard Worker }; 60*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "log_name"; 61*d5c09012SAndroid Build Coastguard Worker } 62*d5c09012SAndroid Build Coastguard Worker 63*d5c09012SAndroid Build Coastguard Worker // Writes log entries to Logging. This API method is the 64*d5c09012SAndroid Build Coastguard Worker // only way to send log entries to Logging. This method 65*d5c09012SAndroid Build Coastguard Worker // is used, directly or indirectly, by the Logging agent 66*d5c09012SAndroid Build Coastguard Worker // (fluentd) and all logging libraries configured to use Logging. 67*d5c09012SAndroid Build Coastguard Worker // A single request may contain log entries for a maximum of 1000 68*d5c09012SAndroid Build Coastguard Worker // different resources (projects, organizations, billing accounts or 69*d5c09012SAndroid Build Coastguard Worker // folders) 70*d5c09012SAndroid Build Coastguard Worker rpc WriteLogEntries(WriteLogEntriesRequest) 71*d5c09012SAndroid Build Coastguard Worker returns (WriteLogEntriesResponse) { 72*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 73*d5c09012SAndroid Build Coastguard Worker post: "/v2/entries:write" 74*d5c09012SAndroid Build Coastguard Worker body: "*" 75*d5c09012SAndroid Build Coastguard Worker }; 76*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "log_name,resource,labels,entries"; 77*d5c09012SAndroid Build Coastguard Worker } 78*d5c09012SAndroid Build Coastguard Worker 79*d5c09012SAndroid Build Coastguard Worker // Lists log entries. Use this method to retrieve log entries that originated 80*d5c09012SAndroid Build Coastguard Worker // from a project/folder/organization/billing account. For ways to export log 81*d5c09012SAndroid Build Coastguard Worker // entries, see [Exporting 82*d5c09012SAndroid Build Coastguard Worker // Logs](https://cloud.google.com/logging/docs/export). 83*d5c09012SAndroid Build Coastguard Worker rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { 84*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 85*d5c09012SAndroid Build Coastguard Worker post: "/v2/entries:list" 86*d5c09012SAndroid Build Coastguard Worker body: "*" 87*d5c09012SAndroid Build Coastguard Worker }; 88*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "resource_names,filter,order_by"; 89*d5c09012SAndroid Build Coastguard Worker } 90*d5c09012SAndroid Build Coastguard Worker 91*d5c09012SAndroid Build Coastguard Worker // Lists the descriptors for monitored resource types used by Logging. 92*d5c09012SAndroid Build Coastguard Worker rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) 93*d5c09012SAndroid Build Coastguard Worker returns (ListMonitoredResourceDescriptorsResponse) { 94*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 95*d5c09012SAndroid Build Coastguard Worker get: "/v2/monitoredResourceDescriptors" 96*d5c09012SAndroid Build Coastguard Worker }; 97*d5c09012SAndroid Build Coastguard Worker } 98*d5c09012SAndroid Build Coastguard Worker 99*d5c09012SAndroid Build Coastguard Worker // Lists the logs in projects, organizations, folders, or billing accounts. 100*d5c09012SAndroid Build Coastguard Worker // Only logs that have entries are listed. 101*d5c09012SAndroid Build Coastguard Worker rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { 102*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 103*d5c09012SAndroid Build Coastguard Worker get: "/v2/{parent=*/*}/logs" 104*d5c09012SAndroid Build Coastguard Worker additional_bindings { get: "/v2/{parent=projects/*}/logs" } 105*d5c09012SAndroid Build Coastguard Worker additional_bindings { get: "/v2/{parent=organizations/*}/logs" } 106*d5c09012SAndroid Build Coastguard Worker additional_bindings { get: "/v2/{parent=folders/*}/logs" } 107*d5c09012SAndroid Build Coastguard Worker additional_bindings { get: "/v2/{parent=billingAccounts/*}/logs" } 108*d5c09012SAndroid Build Coastguard Worker additional_bindings { 109*d5c09012SAndroid Build Coastguard Worker get: "/v2/{parent=projects/*/locations/*/buckets/*/views/*}/logs" 110*d5c09012SAndroid Build Coastguard Worker } 111*d5c09012SAndroid Build Coastguard Worker additional_bindings { 112*d5c09012SAndroid Build Coastguard Worker get: "/v2/{parent=organizations/*/locations/*/buckets/*/views/*}/logs" 113*d5c09012SAndroid Build Coastguard Worker } 114*d5c09012SAndroid Build Coastguard Worker additional_bindings { 115*d5c09012SAndroid Build Coastguard Worker get: "/v2/{parent=folders/*/locations/*/buckets/*/views/*}/logs" 116*d5c09012SAndroid Build Coastguard Worker } 117*d5c09012SAndroid Build Coastguard Worker additional_bindings { 118*d5c09012SAndroid Build Coastguard Worker get: "/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/*}/logs" 119*d5c09012SAndroid Build Coastguard Worker } 120*d5c09012SAndroid Build Coastguard Worker }; 121*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "parent"; 122*d5c09012SAndroid Build Coastguard Worker } 123*d5c09012SAndroid Build Coastguard Worker 124*d5c09012SAndroid Build Coastguard Worker // Streaming read of log entries as they are ingested. Until the stream is 125*d5c09012SAndroid Build Coastguard Worker // terminated, it will continue reading logs. 126*d5c09012SAndroid Build Coastguard Worker rpc TailLogEntries(stream TailLogEntriesRequest) 127*d5c09012SAndroid Build Coastguard Worker returns (stream TailLogEntriesResponse) { 128*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 129*d5c09012SAndroid Build Coastguard Worker post: "/v2/entries:tail" 130*d5c09012SAndroid Build Coastguard Worker body: "*" 131*d5c09012SAndroid Build Coastguard Worker }; 132*d5c09012SAndroid Build Coastguard Worker } 133*d5c09012SAndroid Build Coastguard Worker} 134*d5c09012SAndroid Build Coastguard Worker 135*d5c09012SAndroid Build Coastguard Worker// The parameters to DeleteLog. 136*d5c09012SAndroid Build Coastguard Workermessage DeleteLogRequest { 137*d5c09012SAndroid Build Coastguard Worker // Required. The resource name of the log to delete: 138*d5c09012SAndroid Build Coastguard Worker // 139*d5c09012SAndroid Build Coastguard Worker // * `projects/[PROJECT_ID]/logs/[LOG_ID]` 140*d5c09012SAndroid Build Coastguard Worker // * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` 141*d5c09012SAndroid Build Coastguard Worker // * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` 142*d5c09012SAndroid Build Coastguard Worker // * `folders/[FOLDER_ID]/logs/[LOG_ID]` 143*d5c09012SAndroid Build Coastguard Worker // 144*d5c09012SAndroid Build Coastguard Worker // `[LOG_ID]` must be URL-encoded. For example, 145*d5c09012SAndroid Build Coastguard Worker // `"projects/my-project-id/logs/syslog"`, 146*d5c09012SAndroid Build Coastguard Worker // `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. 147*d5c09012SAndroid Build Coastguard Worker // 148*d5c09012SAndroid Build Coastguard Worker // For more information about log names, see 149*d5c09012SAndroid Build Coastguard Worker // [LogEntry][google.logging.v2.LogEntry]. 150*d5c09012SAndroid Build Coastguard Worker string log_name = 1 [ 151*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 152*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { type: "logging.googleapis.com/Log" } 153*d5c09012SAndroid Build Coastguard Worker ]; 154*d5c09012SAndroid Build Coastguard Worker} 155*d5c09012SAndroid Build Coastguard Worker 156*d5c09012SAndroid Build Coastguard Worker// The parameters to WriteLogEntries. 157*d5c09012SAndroid Build Coastguard Workermessage WriteLogEntriesRequest { 158*d5c09012SAndroid Build Coastguard Worker // Optional. A default log resource name that is assigned to all log entries 159*d5c09012SAndroid Build Coastguard Worker // in `entries` that do not specify a value for `log_name`: 160*d5c09012SAndroid Build Coastguard Worker // 161*d5c09012SAndroid Build Coastguard Worker // * `projects/[PROJECT_ID]/logs/[LOG_ID]` 162*d5c09012SAndroid Build Coastguard Worker // * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` 163*d5c09012SAndroid Build Coastguard Worker // * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` 164*d5c09012SAndroid Build Coastguard Worker // * `folders/[FOLDER_ID]/logs/[LOG_ID]` 165*d5c09012SAndroid Build Coastguard Worker // 166*d5c09012SAndroid Build Coastguard Worker // `[LOG_ID]` must be URL-encoded. For example: 167*d5c09012SAndroid Build Coastguard Worker // 168*d5c09012SAndroid Build Coastguard Worker // "projects/my-project-id/logs/syslog" 169*d5c09012SAndroid Build Coastguard Worker // "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" 170*d5c09012SAndroid Build Coastguard Worker // 171*d5c09012SAndroid Build Coastguard Worker // The permission `logging.logEntries.create` is needed on each project, 172*d5c09012SAndroid Build Coastguard Worker // organization, billing account, or folder that is receiving new log 173*d5c09012SAndroid Build Coastguard Worker // entries, whether the resource is specified in `logName` or in an 174*d5c09012SAndroid Build Coastguard Worker // individual log entry. 175*d5c09012SAndroid Build Coastguard Worker string log_name = 1 [ 176*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = OPTIONAL, 177*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { type: "logging.googleapis.com/Log" } 178*d5c09012SAndroid Build Coastguard Worker ]; 179*d5c09012SAndroid Build Coastguard Worker 180*d5c09012SAndroid Build Coastguard Worker // Optional. A default monitored resource object that is assigned to all log 181*d5c09012SAndroid Build Coastguard Worker // entries in `entries` that do not specify a value for `resource`. Example: 182*d5c09012SAndroid Build Coastguard Worker // 183*d5c09012SAndroid Build Coastguard Worker // { "type": "gce_instance", 184*d5c09012SAndroid Build Coastguard Worker // "labels": { 185*d5c09012SAndroid Build Coastguard Worker // "zone": "us-central1-a", "instance_id": "00000000000000000000" }} 186*d5c09012SAndroid Build Coastguard Worker // 187*d5c09012SAndroid Build Coastguard Worker // See [LogEntry][google.logging.v2.LogEntry]. 188*d5c09012SAndroid Build Coastguard Worker google.api.MonitoredResource resource = 2 189*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OPTIONAL]; 190*d5c09012SAndroid Build Coastguard Worker 191*d5c09012SAndroid Build Coastguard Worker // Optional. Default labels that are added to the `labels` field of all log 192*d5c09012SAndroid Build Coastguard Worker // entries in `entries`. If a log entry already has a label with the same key 193*d5c09012SAndroid Build Coastguard Worker // as a label in this parameter, then the log entry's label is not changed. 194*d5c09012SAndroid Build Coastguard Worker // See [LogEntry][google.logging.v2.LogEntry]. 195*d5c09012SAndroid Build Coastguard Worker map<string, string> labels = 3 [(google.api.field_behavior) = OPTIONAL]; 196*d5c09012SAndroid Build Coastguard Worker 197*d5c09012SAndroid Build Coastguard Worker // Required. The log entries to send to Logging. The order of log 198*d5c09012SAndroid Build Coastguard Worker // entries in this list does not matter. Values supplied in this method's 199*d5c09012SAndroid Build Coastguard Worker // `log_name`, `resource`, and `labels` fields are copied into those log 200*d5c09012SAndroid Build Coastguard Worker // entries in this list that do not include values for their corresponding 201*d5c09012SAndroid Build Coastguard Worker // fields. For more information, see the 202*d5c09012SAndroid Build Coastguard Worker // [LogEntry][google.logging.v2.LogEntry] type. 203*d5c09012SAndroid Build Coastguard Worker // 204*d5c09012SAndroid Build Coastguard Worker // If the `timestamp` or `insert_id` fields are missing in log entries, then 205*d5c09012SAndroid Build Coastguard Worker // this method supplies the current time or a unique identifier, respectively. 206*d5c09012SAndroid Build Coastguard Worker // The supplied values are chosen so that, among the log entries that did not 207*d5c09012SAndroid Build Coastguard Worker // supply their own values, the entries earlier in the list will sort before 208*d5c09012SAndroid Build Coastguard Worker // the entries later in the list. See the `entries.list` method. 209*d5c09012SAndroid Build Coastguard Worker // 210*d5c09012SAndroid Build Coastguard Worker // Log entries with timestamps that are more than the 211*d5c09012SAndroid Build Coastguard Worker // [logs retention period](https://cloud.google.com/logging/quotas) in 212*d5c09012SAndroid Build Coastguard Worker // the past or more than 24 hours in the future will not be available when 213*d5c09012SAndroid Build Coastguard Worker // calling `entries.list`. However, those log entries can still be [exported 214*d5c09012SAndroid Build Coastguard Worker // with 215*d5c09012SAndroid Build Coastguard Worker // LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). 216*d5c09012SAndroid Build Coastguard Worker // 217*d5c09012SAndroid Build Coastguard Worker // To improve throughput and to avoid exceeding the 218*d5c09012SAndroid Build Coastguard Worker // [quota limit](https://cloud.google.com/logging/quotas) for calls to 219*d5c09012SAndroid Build Coastguard Worker // `entries.write`, you should try to include several log entries in this 220*d5c09012SAndroid Build Coastguard Worker // list, rather than calling this method for each individual log entry. 221*d5c09012SAndroid Build Coastguard Worker repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; 222*d5c09012SAndroid Build Coastguard Worker 223*d5c09012SAndroid Build Coastguard Worker // Optional. Whether a batch's valid entries should be written even if some 224*d5c09012SAndroid Build Coastguard Worker // other entry failed due to a permanent error such as INVALID_ARGUMENT or 225*d5c09012SAndroid Build Coastguard Worker // PERMISSION_DENIED. If any entry failed, then the response status is the 226*d5c09012SAndroid Build Coastguard Worker // response status of one of the failed entries. The response will include 227*d5c09012SAndroid Build Coastguard Worker // error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by 228*d5c09012SAndroid Build Coastguard Worker // the entries' zero-based index in the `entries`. Failed requests for which 229*d5c09012SAndroid Build Coastguard Worker // no entries are written will not include per-entry errors. 230*d5c09012SAndroid Build Coastguard Worker bool partial_success = 5 [(google.api.field_behavior) = OPTIONAL]; 231*d5c09012SAndroid Build Coastguard Worker 232*d5c09012SAndroid Build Coastguard Worker // Optional. If true, the request should expect normal response, but the 233*d5c09012SAndroid Build Coastguard Worker // entries won't be persisted nor exported. Useful for checking whether the 234*d5c09012SAndroid Build Coastguard Worker // logging API endpoints are working properly before sending valuable data. 235*d5c09012SAndroid Build Coastguard Worker bool dry_run = 6 [(google.api.field_behavior) = OPTIONAL]; 236*d5c09012SAndroid Build Coastguard Worker} 237*d5c09012SAndroid Build Coastguard Worker 238*d5c09012SAndroid Build Coastguard Worker// Result returned from WriteLogEntries. 239*d5c09012SAndroid Build Coastguard Workermessage WriteLogEntriesResponse {} 240*d5c09012SAndroid Build Coastguard Worker 241*d5c09012SAndroid Build Coastguard Worker// Error details for WriteLogEntries with partial success. 242*d5c09012SAndroid Build Coastguard Workermessage WriteLogEntriesPartialErrors { 243*d5c09012SAndroid Build Coastguard Worker // When `WriteLogEntriesRequest.partial_success` is true, records the error 244*d5c09012SAndroid Build Coastguard Worker // status for entries that were not written due to a permanent error, keyed 245*d5c09012SAndroid Build Coastguard Worker // by the entry's zero-based index in `WriteLogEntriesRequest.entries`. 246*d5c09012SAndroid Build Coastguard Worker // 247*d5c09012SAndroid Build Coastguard Worker // Failed requests for which no entries are written will not include 248*d5c09012SAndroid Build Coastguard Worker // per-entry errors. 249*d5c09012SAndroid Build Coastguard Worker map<int32, google.rpc.Status> log_entry_errors = 1; 250*d5c09012SAndroid Build Coastguard Worker} 251*d5c09012SAndroid Build Coastguard Worker 252*d5c09012SAndroid Build Coastguard Worker// The parameters to `ListLogEntries`. 253*d5c09012SAndroid Build Coastguard Workermessage ListLogEntriesRequest { 254*d5c09012SAndroid Build Coastguard Worker // Required. Names of one or more parent resources from which to 255*d5c09012SAndroid Build Coastguard Worker // retrieve log entries: 256*d5c09012SAndroid Build Coastguard Worker // 257*d5c09012SAndroid Build Coastguard Worker // * `projects/[PROJECT_ID]` 258*d5c09012SAndroid Build Coastguard Worker // * `organizations/[ORGANIZATION_ID]` 259*d5c09012SAndroid Build Coastguard Worker // * `billingAccounts/[BILLING_ACCOUNT_ID]` 260*d5c09012SAndroid Build Coastguard Worker // * `folders/[FOLDER_ID]` 261*d5c09012SAndroid Build Coastguard Worker // 262*d5c09012SAndroid Build Coastguard Worker // May alternatively be one or more views: 263*d5c09012SAndroid Build Coastguard Worker // 264*d5c09012SAndroid Build Coastguard Worker // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 265*d5c09012SAndroid Build Coastguard Worker // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 266*d5c09012SAndroid Build Coastguard Worker // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 267*d5c09012SAndroid Build Coastguard Worker // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 268*d5c09012SAndroid Build Coastguard Worker // 269*d5c09012SAndroid Build Coastguard Worker // Projects listed in the `project_ids` field are added to this list. 270*d5c09012SAndroid Build Coastguard Worker // A maximum of 100 resources may be specified in a single request. 271*d5c09012SAndroid Build Coastguard Worker repeated string resource_names = 8 [ 272*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 273*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 274*d5c09012SAndroid Build Coastguard Worker child_type: "logging.googleapis.com/Log" 275*d5c09012SAndroid Build Coastguard Worker } 276*d5c09012SAndroid Build Coastguard Worker ]; 277*d5c09012SAndroid Build Coastguard Worker 278*d5c09012SAndroid Build Coastguard Worker // Optional. Only log entries that match the filter are returned. An empty 279*d5c09012SAndroid Build Coastguard Worker // filter matches all log entries in the resources listed in `resource_names`. 280*d5c09012SAndroid Build Coastguard Worker // Referencing a parent resource that is not listed in `resource_names` will 281*d5c09012SAndroid Build Coastguard Worker // cause the filter to return no results. The maximum length of a filter is 282*d5c09012SAndroid Build Coastguard Worker // 20,000 characters. 283*d5c09012SAndroid Build Coastguard Worker string filter = 2 [(google.api.field_behavior) = OPTIONAL]; 284*d5c09012SAndroid Build Coastguard Worker 285*d5c09012SAndroid Build Coastguard Worker // Optional. How the results should be sorted. Presently, the only permitted 286*d5c09012SAndroid Build Coastguard Worker // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first 287*d5c09012SAndroid Build Coastguard Worker // option returns entries in order of increasing values of 288*d5c09012SAndroid Build Coastguard Worker // `LogEntry.timestamp` (oldest first), and the second option returns entries 289*d5c09012SAndroid Build Coastguard Worker // in order of decreasing timestamps (newest first). Entries with equal 290*d5c09012SAndroid Build Coastguard Worker // timestamps are returned in order of their `insert_id` values. 291*d5c09012SAndroid Build Coastguard Worker string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; 292*d5c09012SAndroid Build Coastguard Worker 293*d5c09012SAndroid Build Coastguard Worker // Optional. The maximum number of results to return from this request. 294*d5c09012SAndroid Build Coastguard Worker // Default is 50. If the value is negative or exceeds 1000, the request is 295*d5c09012SAndroid Build Coastguard Worker // rejected. The presence of `next_page_token` in the response indicates that 296*d5c09012SAndroid Build Coastguard Worker // more results might be available. 297*d5c09012SAndroid Build Coastguard Worker int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; 298*d5c09012SAndroid Build Coastguard Worker 299*d5c09012SAndroid Build Coastguard Worker // Optional. If present, then retrieve the next batch of results from the 300*d5c09012SAndroid Build Coastguard Worker // preceding call to this method. `page_token` must be the value of 301*d5c09012SAndroid Build Coastguard Worker // `next_page_token` from the previous response. The values of other method 302*d5c09012SAndroid Build Coastguard Worker // parameters should be identical to those in the previous call. 303*d5c09012SAndroid Build Coastguard Worker string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; 304*d5c09012SAndroid Build Coastguard Worker} 305*d5c09012SAndroid Build Coastguard Worker 306*d5c09012SAndroid Build Coastguard Worker// Result returned from `ListLogEntries`. 307*d5c09012SAndroid Build Coastguard Workermessage ListLogEntriesResponse { 308*d5c09012SAndroid Build Coastguard Worker // A list of log entries. If `entries` is empty, `nextPageToken` may still be 309*d5c09012SAndroid Build Coastguard Worker // returned, indicating that more entries may exist. See `nextPageToken` for 310*d5c09012SAndroid Build Coastguard Worker // more information. 311*d5c09012SAndroid Build Coastguard Worker repeated LogEntry entries = 1; 312*d5c09012SAndroid Build Coastguard Worker 313*d5c09012SAndroid Build Coastguard Worker // If there might be more results than those appearing in this response, then 314*d5c09012SAndroid Build Coastguard Worker // `nextPageToken` is included. To get the next set of results, call this 315*d5c09012SAndroid Build Coastguard Worker // method again using the value of `nextPageToken` as `pageToken`. 316*d5c09012SAndroid Build Coastguard Worker // 317*d5c09012SAndroid Build Coastguard Worker // If a value for `next_page_token` appears and the `entries` field is empty, 318*d5c09012SAndroid Build Coastguard Worker // it means that the search found no log entries so far but it did not have 319*d5c09012SAndroid Build Coastguard Worker // time to search all the possible log entries. Retry the method with this 320*d5c09012SAndroid Build Coastguard Worker // value for `page_token` to continue the search. Alternatively, consider 321*d5c09012SAndroid Build Coastguard Worker // speeding up the search by changing your filter to specify a single log name 322*d5c09012SAndroid Build Coastguard Worker // or resource type, or to narrow the time range of the search. 323*d5c09012SAndroid Build Coastguard Worker string next_page_token = 2; 324*d5c09012SAndroid Build Coastguard Worker} 325*d5c09012SAndroid Build Coastguard Worker 326*d5c09012SAndroid Build Coastguard Worker// The parameters to ListMonitoredResourceDescriptors 327*d5c09012SAndroid Build Coastguard Workermessage ListMonitoredResourceDescriptorsRequest { 328*d5c09012SAndroid Build Coastguard Worker // Optional. The maximum number of results to return from this request. 329*d5c09012SAndroid Build Coastguard Worker // Non-positive values are ignored. The presence of `nextPageToken` in the 330*d5c09012SAndroid Build Coastguard Worker // response indicates that more results might be available. 331*d5c09012SAndroid Build Coastguard Worker int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; 332*d5c09012SAndroid Build Coastguard Worker 333*d5c09012SAndroid Build Coastguard Worker // Optional. If present, then retrieve the next batch of results from the 334*d5c09012SAndroid Build Coastguard Worker // preceding call to this method. `pageToken` must be the value of 335*d5c09012SAndroid Build Coastguard Worker // `nextPageToken` from the previous response. The values of other method 336*d5c09012SAndroid Build Coastguard Worker // parameters should be identical to those in the previous call. 337*d5c09012SAndroid Build Coastguard Worker string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; 338*d5c09012SAndroid Build Coastguard Worker} 339*d5c09012SAndroid Build Coastguard Worker 340*d5c09012SAndroid Build Coastguard Worker// Result returned from ListMonitoredResourceDescriptors. 341*d5c09012SAndroid Build Coastguard Workermessage ListMonitoredResourceDescriptorsResponse { 342*d5c09012SAndroid Build Coastguard Worker // A list of resource descriptors. 343*d5c09012SAndroid Build Coastguard Worker repeated google.api.MonitoredResourceDescriptor resource_descriptors = 1; 344*d5c09012SAndroid Build Coastguard Worker 345*d5c09012SAndroid Build Coastguard Worker // If there might be more results than those appearing in this response, then 346*d5c09012SAndroid Build Coastguard Worker // `nextPageToken` is included. To get the next set of results, call this 347*d5c09012SAndroid Build Coastguard Worker // method again using the value of `nextPageToken` as `pageToken`. 348*d5c09012SAndroid Build Coastguard Worker string next_page_token = 2; 349*d5c09012SAndroid Build Coastguard Worker} 350*d5c09012SAndroid Build Coastguard Worker 351*d5c09012SAndroid Build Coastguard Worker// The parameters to ListLogs. 352*d5c09012SAndroid Build Coastguard Workermessage ListLogsRequest { 353*d5c09012SAndroid Build Coastguard Worker // Required. The resource name to list logs for: 354*d5c09012SAndroid Build Coastguard Worker // 355*d5c09012SAndroid Build Coastguard Worker // * `projects/[PROJECT_ID]` 356*d5c09012SAndroid Build Coastguard Worker // * `organizations/[ORGANIZATION_ID]` 357*d5c09012SAndroid Build Coastguard Worker // * `billingAccounts/[BILLING_ACCOUNT_ID]` 358*d5c09012SAndroid Build Coastguard Worker // * `folders/[FOLDER_ID]` 359*d5c09012SAndroid Build Coastguard Worker string parent = 1 [ 360*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 361*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 362*d5c09012SAndroid Build Coastguard Worker child_type: "logging.googleapis.com/Log" 363*d5c09012SAndroid Build Coastguard Worker } 364*d5c09012SAndroid Build Coastguard Worker ]; 365*d5c09012SAndroid Build Coastguard Worker 366*d5c09012SAndroid Build Coastguard Worker // Optional. List of resource names to list logs for: 367*d5c09012SAndroid Build Coastguard Worker // 368*d5c09012SAndroid Build Coastguard Worker // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 369*d5c09012SAndroid Build Coastguard Worker // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 370*d5c09012SAndroid Build Coastguard Worker // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 371*d5c09012SAndroid Build Coastguard Worker // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 372*d5c09012SAndroid Build Coastguard Worker // 373*d5c09012SAndroid Build Coastguard Worker // To support legacy queries, it could also be: 374*d5c09012SAndroid Build Coastguard Worker // 375*d5c09012SAndroid Build Coastguard Worker // * `projects/[PROJECT_ID]` 376*d5c09012SAndroid Build Coastguard Worker // * `organizations/[ORGANIZATION_ID]` 377*d5c09012SAndroid Build Coastguard Worker // * `billingAccounts/[BILLING_ACCOUNT_ID]` 378*d5c09012SAndroid Build Coastguard Worker // * `folders/[FOLDER_ID]` 379*d5c09012SAndroid Build Coastguard Worker // 380*d5c09012SAndroid Build Coastguard Worker // The resource name in the `parent` field is added to this list. 381*d5c09012SAndroid Build Coastguard Worker repeated string resource_names = 8 [ 382*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = OPTIONAL, 383*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 384*d5c09012SAndroid Build Coastguard Worker child_type: "logging.googleapis.com/Log" 385*d5c09012SAndroid Build Coastguard Worker } 386*d5c09012SAndroid Build Coastguard Worker ]; 387*d5c09012SAndroid Build Coastguard Worker 388*d5c09012SAndroid Build Coastguard Worker // Optional. The maximum number of results to return from this request. 389*d5c09012SAndroid Build Coastguard Worker // Non-positive values are ignored. The presence of `nextPageToken` in the 390*d5c09012SAndroid Build Coastguard Worker // response indicates that more results might be available. 391*d5c09012SAndroid Build Coastguard Worker int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 392*d5c09012SAndroid Build Coastguard Worker 393*d5c09012SAndroid Build Coastguard Worker // Optional. If present, then retrieve the next batch of results from the 394*d5c09012SAndroid Build Coastguard Worker // preceding call to this method. `pageToken` must be the value of 395*d5c09012SAndroid Build Coastguard Worker // `nextPageToken` from the previous response. The values of other method 396*d5c09012SAndroid Build Coastguard Worker // parameters should be identical to those in the previous call. 397*d5c09012SAndroid Build Coastguard Worker string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 398*d5c09012SAndroid Build Coastguard Worker} 399*d5c09012SAndroid Build Coastguard Worker 400*d5c09012SAndroid Build Coastguard Worker// Result returned from ListLogs. 401*d5c09012SAndroid Build Coastguard Workermessage ListLogsResponse { 402*d5c09012SAndroid Build Coastguard Worker // A list of log names. For example, 403*d5c09012SAndroid Build Coastguard Worker // `"projects/my-project/logs/syslog"` or 404*d5c09012SAndroid Build Coastguard Worker // `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. 405*d5c09012SAndroid Build Coastguard Worker repeated string log_names = 3; 406*d5c09012SAndroid Build Coastguard Worker 407*d5c09012SAndroid Build Coastguard Worker // If there might be more results than those appearing in this response, then 408*d5c09012SAndroid Build Coastguard Worker // `nextPageToken` is included. To get the next set of results, call this 409*d5c09012SAndroid Build Coastguard Worker // method again using the value of `nextPageToken` as `pageToken`. 410*d5c09012SAndroid Build Coastguard Worker string next_page_token = 2; 411*d5c09012SAndroid Build Coastguard Worker} 412*d5c09012SAndroid Build Coastguard Worker 413*d5c09012SAndroid Build Coastguard Worker// The parameters to `TailLogEntries`. 414*d5c09012SAndroid Build Coastguard Workermessage TailLogEntriesRequest { 415*d5c09012SAndroid Build Coastguard Worker // Required. Name of a parent resource from which to retrieve log entries: 416*d5c09012SAndroid Build Coastguard Worker // 417*d5c09012SAndroid Build Coastguard Worker // * `projects/[PROJECT_ID]` 418*d5c09012SAndroid Build Coastguard Worker // * `organizations/[ORGANIZATION_ID]` 419*d5c09012SAndroid Build Coastguard Worker // * `billingAccounts/[BILLING_ACCOUNT_ID]` 420*d5c09012SAndroid Build Coastguard Worker // * `folders/[FOLDER_ID]` 421*d5c09012SAndroid Build Coastguard Worker // 422*d5c09012SAndroid Build Coastguard Worker // May alternatively be one or more views: 423*d5c09012SAndroid Build Coastguard Worker // 424*d5c09012SAndroid Build Coastguard Worker // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 425*d5c09012SAndroid Build Coastguard Worker // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 426*d5c09012SAndroid Build Coastguard Worker // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 427*d5c09012SAndroid Build Coastguard Worker // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` 428*d5c09012SAndroid Build Coastguard Worker repeated string resource_names = 1 [(google.api.field_behavior) = REQUIRED]; 429*d5c09012SAndroid Build Coastguard Worker 430*d5c09012SAndroid Build Coastguard Worker // Optional. Only log entries that match the filter are returned. An empty 431*d5c09012SAndroid Build Coastguard Worker // filter matches all log entries in the resources listed in `resource_names`. 432*d5c09012SAndroid Build Coastguard Worker // Referencing a parent resource that is not listed in `resource_names` will 433*d5c09012SAndroid Build Coastguard Worker // cause the filter to return no results. The maximum length of a filter is 434*d5c09012SAndroid Build Coastguard Worker // 20,000 characters. 435*d5c09012SAndroid Build Coastguard Worker string filter = 2 [(google.api.field_behavior) = OPTIONAL]; 436*d5c09012SAndroid Build Coastguard Worker 437*d5c09012SAndroid Build Coastguard Worker // Optional. The amount of time to buffer log entries at the server before 438*d5c09012SAndroid Build Coastguard Worker // being returned to prevent out of order results due to late arriving log 439*d5c09012SAndroid Build Coastguard Worker // entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 440*d5c09012SAndroid Build Coastguard Worker // milliseconds. 441*d5c09012SAndroid Build Coastguard Worker google.protobuf.Duration buffer_window = 3 442*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OPTIONAL]; 443*d5c09012SAndroid Build Coastguard Worker} 444*d5c09012SAndroid Build Coastguard Worker 445*d5c09012SAndroid Build Coastguard Worker// Result returned from `TailLogEntries`. 446*d5c09012SAndroid Build Coastguard Workermessage TailLogEntriesResponse { 447*d5c09012SAndroid Build Coastguard Worker // Information about entries that were omitted from the session. 448*d5c09012SAndroid Build Coastguard Worker message SuppressionInfo { 449*d5c09012SAndroid Build Coastguard Worker // An indicator of why entries were omitted. 450*d5c09012SAndroid Build Coastguard Worker enum Reason { 451*d5c09012SAndroid Build Coastguard Worker // Unexpected default. 452*d5c09012SAndroid Build Coastguard Worker REASON_UNSPECIFIED = 0; 453*d5c09012SAndroid Build Coastguard Worker 454*d5c09012SAndroid Build Coastguard Worker // Indicates suppression occurred due to relevant entries being 455*d5c09012SAndroid Build Coastguard Worker // received in excess of rate limits. For quotas and limits, see 456*d5c09012SAndroid Build Coastguard Worker // [Logging API quotas and 457*d5c09012SAndroid Build Coastguard Worker // limits](https://cloud.google.com/logging/quotas#api-limits). 458*d5c09012SAndroid Build Coastguard Worker RATE_LIMIT = 1; 459*d5c09012SAndroid Build Coastguard Worker 460*d5c09012SAndroid Build Coastguard Worker // Indicates suppression occurred due to the client not consuming 461*d5c09012SAndroid Build Coastguard Worker // responses quickly enough. 462*d5c09012SAndroid Build Coastguard Worker NOT_CONSUMED = 2; 463*d5c09012SAndroid Build Coastguard Worker } 464*d5c09012SAndroid Build Coastguard Worker 465*d5c09012SAndroid Build Coastguard Worker // The reason that entries were omitted from the session. 466*d5c09012SAndroid Build Coastguard Worker Reason reason = 1; 467*d5c09012SAndroid Build Coastguard Worker 468*d5c09012SAndroid Build Coastguard Worker // A lower bound on the count of entries omitted due to `reason`. 469*d5c09012SAndroid Build Coastguard Worker int32 suppressed_count = 2; 470*d5c09012SAndroid Build Coastguard Worker } 471*d5c09012SAndroid Build Coastguard Worker 472*d5c09012SAndroid Build Coastguard Worker // A list of log entries. Each response in the stream will order entries with 473*d5c09012SAndroid Build Coastguard Worker // increasing values of `LogEntry.timestamp`. Ordering is not guaranteed 474*d5c09012SAndroid Build Coastguard Worker // between separate responses. 475*d5c09012SAndroid Build Coastguard Worker repeated LogEntry entries = 1; 476*d5c09012SAndroid Build Coastguard Worker 477*d5c09012SAndroid Build Coastguard Worker // If entries that otherwise would have been included in the session were not 478*d5c09012SAndroid Build Coastguard Worker // sent back to the client, counts of relevant entries omitted from the 479*d5c09012SAndroid Build Coastguard Worker // session with the reason that they were not included. There will be at most 480*d5c09012SAndroid Build Coastguard Worker // one of each reason per response. The counts represent the number of 481*d5c09012SAndroid Build Coastguard Worker // suppressed entries since the last streamed response. 482*d5c09012SAndroid Build Coastguard Worker repeated SuppressionInfo suppression_info = 2; 483*d5c09012SAndroid Build Coastguard Worker} 484