1- // Copyright 2020 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@ syntax = "proto3";
1616
1717package google.logging.v2 ;
1818
19+ import "google/api/annotations.proto" ;
1920import "google/api/client.proto" ;
2021import "google/api/field_behavior.proto" ;
2122import "google/api/monitored_resource.proto" ;
@@ -27,7 +28,6 @@ import "google/protobuf/empty.proto";
2728import "google/protobuf/field_mask.proto" ;
2829import "google/protobuf/timestamp.proto" ;
2930import "google/rpc/status.proto" ;
30- import "google/api/annotations.proto" ;
3131
3232option cc_enable_arenas = true ;
3333option csharp_namespace = "Google.Cloud.Logging.V2" ;
@@ -48,10 +48,10 @@ service LoggingServiceV2 {
4848 "https://www.googleapis.com/auth/logging.read,"
4949 "https://www.googleapis.com/auth/logging.write" ;
5050
51- // Deletes all the log entries in a log. The log reappears if it receives new
52- // entries. Log entries written shortly before the delete operation might not
53- // be deleted. Entries received after the delete operation with a timestamp
54- // before the operation will be deleted.
51+ // Deletes all the log entries in a log for the _Default Log Bucket. The log
52+ // reappears if it receives new entries. Log entries written shortly before
53+ // the delete operation might not be deleted. Entries received after the
54+ // delete operation with a timestamp before the operation will be deleted.
5555 rpc DeleteLog (DeleteLogRequest ) returns (google.protobuf.Empty ) {
5656 option (google.api.http ) = {
5757 delete : "/v2/{log_name=projects/*/logs/*}"
@@ -140,14 +140,15 @@ service LoggingServiceV2 {
140140message DeleteLogRequest {
141141 // Required. The resource name of the log to delete:
142142 //
143- // " projects/[PROJECT_ID]/logs/[LOG_ID]"
144- // " organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
145- // " billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
146- // " folders/[FOLDER_ID]/logs/[LOG_ID]"
143+ // * ` projects/[PROJECT_ID]/logs/[LOG_ID]`
144+ // * ` organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`
145+ // * ` billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`
146+ // * ` folders/[FOLDER_ID]/logs/[LOG_ID]`
147147 //
148148 // `[LOG_ID]` must be URL-encoded. For example,
149149 // `"projects/my-project-id/logs/syslog"`,
150- // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
150+ // `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`.
151+ //
151152 // For more information about log names, see
152153 // [LogEntry][google.logging.v2.LogEntry].
153154 string log_name = 1 [
@@ -163,15 +164,15 @@ message WriteLogEntriesRequest {
163164 // Optional. A default log resource name that is assigned to all log entries
164165 // in `entries` that do not specify a value for `log_name`:
165166 //
166- // " projects/[PROJECT_ID]/logs/[LOG_ID]"
167- // " organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
168- // " billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
169- // " folders/[FOLDER_ID]/logs/[LOG_ID]"
167+ // * ` projects/[PROJECT_ID]/logs/[LOG_ID]`
168+ // * ` organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`
169+ // * ` billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`
170+ // * ` folders/[FOLDER_ID]/logs/[LOG_ID]`
170171 //
171172 // `[LOG_ID]` must be URL-encoded. For example:
172173 //
173174 // "projects/my-project-id/logs/syslog"
174- // "organizations/1234567890 /logs/cloudresourcemanager .googleapis.com%2Factivity"
175+ // "organizations/123 /logs/cloudaudit .googleapis.com%2Factivity"
175176 //
176177 // The permission `logging.logEntries.create` is needed on each project,
177178 // organization, billing account, or folder that is receiving new log
@@ -214,14 +215,14 @@ message WriteLogEntriesRequest {
214215 // the entries later in the list. See the `entries.list` method.
215216 //
216217 // Log entries with timestamps that are more than the
217- // [logs retention period](https://cloud.google.com/logging/quota-policy ) in
218+ // [logs retention period](https://cloud.google.com/logging/quotas ) in
218219 // the past or more than 24 hours in the future will not be available when
219220 // calling `entries.list`. However, those log entries can still be [exported
220221 // with
221222 // LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
222223 //
223224 // To improve throughput and to avoid exceeding the
224- // [quota limit](https://cloud.google.com/logging/quota-policy ) for calls to
225+ // [quota limit](https://cloud.google.com/logging/quotas ) for calls to
225226 // `entries.write`, you should try to include several log entries in this
226227 // list, rather than calling this method for each individual log entry.
227228 repeated LogEntry entries = 4 [(google.api.field_behavior ) = REQUIRED ];
@@ -258,16 +259,17 @@ message ListLogEntriesRequest {
258259 // Required. Names of one or more parent resources from which to
259260 // retrieve log entries:
260261 //
261- // "projects/[PROJECT_ID]"
262- // "organizations/[ORGANIZATION_ID]"
263- // "billingAccounts/[BILLING_ACCOUNT_ID]"
264- // "folders/[FOLDER_ID]"
262+ // * `projects/[PROJECT_ID]`
263+ // * `organizations/[ORGANIZATION_ID]`
264+ // * `billingAccounts/[BILLING_ACCOUNT_ID]`
265+ // * `folders/[FOLDER_ID]`
266+ //
267+ // May alternatively be one or more views:
265268 //
266- // May alternatively be one or more views
267- // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
268- // organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
269- // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
270- // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
269+ // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
270+ // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
271+ // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
272+ // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
271273 //
272274 // Projects listed in the `project_ids` field are added to this list.
273275 repeated string resource_names = 8 [
@@ -294,10 +296,10 @@ message ListLogEntriesRequest {
294296 // timestamps are returned in order of their `insert_id` values.
295297 string order_by = 3 [(google.api.field_behavior ) = OPTIONAL ];
296298
297- // Optional. The maximum number of results to return from this request.
298- // Default is 50. If the value is negative or exceeds 1000,
299- // the request is rejected. The presence of `next_page_token` in the
300- // response indicates that more results might be available.
299+ // Optional. The maximum number of results to return from this request. Default is 50.
300+ // If the value is negative or exceeds 1000, the request is rejected. The
301+ // presence of `next_page_token` in the response indicates that more results
302+ // might be available.
301303 int32 page_size = 4 [(google.api.field_behavior ) = OPTIONAL ];
302304
303305 // Optional. If present, then retrieve the next batch of results from the
@@ -356,10 +358,10 @@ message ListMonitoredResourceDescriptorsResponse {
356358message ListLogsRequest {
357359 // Required. The resource name that owns the logs:
358360 //
359- // " projects/[PROJECT_ID]"
360- // " organizations/[ORGANIZATION_ID]"
361- // " billingAccounts/[BILLING_ACCOUNT_ID]"
362- // " folders/[FOLDER_ID]"
361+ // * ` projects/[PROJECT_ID]`
362+ // * ` organizations/[ORGANIZATION_ID]`
363+ // * ` billingAccounts/[BILLING_ACCOUNT_ID]`
364+ // * ` folders/[FOLDER_ID]`
363365 string parent = 1 [
364366 (google.api.field_behavior ) = REQUIRED ,
365367 (google.api.resource_reference ) = {
@@ -379,17 +381,24 @@ message ListLogsRequest {
379381 string page_token = 3 [(google.api.field_behavior ) = OPTIONAL ];
380382
381383 // Optional. The resource name that owns the logs:
382- // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
383- // organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
384- // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
385- // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]
384+ //
385+ // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
386+ // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
387+ // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
388+ // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
386389 //
387390 // To support legacy queries, it could also be:
388- // "projects/[PROJECT_ID]"
389- // "organizations/[ORGANIZATION_ID]"
390- // "billingAccounts/[BILLING_ACCOUNT_ID]"
391- // "folders/[FOLDER_ID]"
392- repeated string resource_names = 8 [(google.api.field_behavior ) = OPTIONAL ];
391+ //
392+ // * `projects/[PROJECT_ID]`
393+ // * `organizations/[ORGANIZATION_ID]`
394+ // * `billingAccounts/[BILLING_ACCOUNT_ID]`
395+ // * `folders/[FOLDER_ID]`
396+ repeated string resource_names = 8 [
397+ (google.api.field_behavior ) = OPTIONAL ,
398+ (google.api.resource_reference ) = {
399+ child_type : "logging.googleapis.com/Log"
400+ }
401+ ];
393402}
394403
395404// Result returned from ListLogs.
@@ -409,16 +418,17 @@ message ListLogsResponse {
409418message TailLogEntriesRequest {
410419 // Required. Name of a parent resource from which to retrieve log entries:
411420 //
412- // " projects/[PROJECT_ID]"
413- // " organizations/[ORGANIZATION_ID]"
414- // " billingAccounts/[BILLING_ACCOUNT_ID]"
415- // " folders/[FOLDER_ID]"
421+ // * ` projects/[PROJECT_ID]`
422+ // * ` organizations/[ORGANIZATION_ID]`
423+ // * ` billingAccounts/[BILLING_ACCOUNT_ID]`
424+ // * ` folders/[FOLDER_ID]`
416425 //
417426 // May alternatively be one or more views:
418- // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
419- // "organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
420- // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
421- // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
427+ //
428+ // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
429+ // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
430+ // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
431+ // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
422432 repeated string resource_names = 1 [(google.api.field_behavior ) = REQUIRED ];
423433
424434 // Optional. A filter that chooses which log entries to return. See [Advanced
0 commit comments