|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
// Copyright 2020 Google LLC |
|
|
|
|
// Copyright 2022 Google LLC |
|
|
|
|
// |
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
// you may not use this file except in compliance with the License. |
|
|
|
@ -16,6 +16,7 @@ syntax = "proto3"; |
|
|
|
|
|
|
|
|
|
package google.logging.v2; |
|
|
|
|
|
|
|
|
|
import "google/api/annotations.proto"; |
|
|
|
|
import "google/api/client.proto"; |
|
|
|
|
import "google/api/field_behavior.proto"; |
|
|
|
|
import "google/api/monitored_resource.proto"; |
|
|
|
@ -27,7 +28,6 @@ import "google/protobuf/empty.proto"; |
|
|
|
|
import "google/protobuf/field_mask.proto"; |
|
|
|
|
import "google/protobuf/timestamp.proto"; |
|
|
|
|
import "google/rpc/status.proto"; |
|
|
|
|
import "google/api/annotations.proto"; |
|
|
|
|
|
|
|
|
|
option cc_enable_arenas = true; |
|
|
|
|
option csharp_namespace = "Google.Cloud.Logging.V2"; |
|
|
|
@ -48,10 +48,10 @@ service LoggingServiceV2 { |
|
|
|
|
"https://www.googleapis.com/auth/logging.read," |
|
|
|
|
"https://www.googleapis.com/auth/logging.write"; |
|
|
|
|
|
|
|
|
|
// Deletes all the log entries in a log. The log reappears if it receives new |
|
|
|
|
// entries. Log entries written shortly before the delete operation might not |
|
|
|
|
// be deleted. Entries received after the delete operation with a timestamp |
|
|
|
|
// before the operation will be deleted. |
|
|
|
|
// Deletes all the log entries in a log for the _Default Log Bucket. The log |
|
|
|
|
// reappears if it receives new entries. Log entries written shortly before |
|
|
|
|
// the delete operation might not be deleted. Entries received after the |
|
|
|
|
// delete operation with a timestamp before the operation will be deleted. |
|
|
|
|
rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { |
|
|
|
|
option (google.api.http) = { |
|
|
|
|
delete: "/v2/{log_name=projects/*/logs/*}" |
|
|
|
@ -140,14 +140,15 @@ service LoggingServiceV2 { |
|
|
|
|
message DeleteLogRequest { |
|
|
|
|
// Required. The resource name of the log to delete: |
|
|
|
|
// |
|
|
|
|
// "projects/[PROJECT_ID]/logs/[LOG_ID]" |
|
|
|
|
// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" |
|
|
|
|
// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" |
|
|
|
|
// "folders/[FOLDER_ID]/logs/[LOG_ID]" |
|
|
|
|
// * `projects/[PROJECT_ID]/logs/[LOG_ID]` |
|
|
|
|
// * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` |
|
|
|
|
// * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` |
|
|
|
|
// * `folders/[FOLDER_ID]/logs/[LOG_ID]` |
|
|
|
|
// |
|
|
|
|
// `[LOG_ID]` must be URL-encoded. For example, |
|
|
|
|
// `"projects/my-project-id/logs/syslog"`, |
|
|
|
|
// `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. |
|
|
|
|
// `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. |
|
|
|
|
// |
|
|
|
|
// For more information about log names, see |
|
|
|
|
// [LogEntry][google.logging.v2.LogEntry]. |
|
|
|
|
string log_name = 1 [ |
|
|
|
@ -163,15 +164,15 @@ message WriteLogEntriesRequest { |
|
|
|
|
// Optional. A default log resource name that is assigned to all log entries |
|
|
|
|
// in `entries` that do not specify a value for `log_name`: |
|
|
|
|
// |
|
|
|
|
// "projects/[PROJECT_ID]/logs/[LOG_ID]" |
|
|
|
|
// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" |
|
|
|
|
// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" |
|
|
|
|
// "folders/[FOLDER_ID]/logs/[LOG_ID]" |
|
|
|
|
// * `projects/[PROJECT_ID]/logs/[LOG_ID]` |
|
|
|
|
// * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` |
|
|
|
|
// * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` |
|
|
|
|
// * `folders/[FOLDER_ID]/logs/[LOG_ID]` |
|
|
|
|
// |
|
|
|
|
// `[LOG_ID]` must be URL-encoded. For example: |
|
|
|
|
// |
|
|
|
|
// "projects/my-project-id/logs/syslog" |
|
|
|
|
// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" |
|
|
|
|
// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" |
|
|
|
|
// |
|
|
|
|
// The permission `logging.logEntries.create` is needed on each project, |
|
|
|
|
// organization, billing account, or folder that is receiving new log |
|
|
|
@ -214,14 +215,14 @@ message WriteLogEntriesRequest { |
|
|
|
|
// the entries later in the list. See the `entries.list` method. |
|
|
|
|
// |
|
|
|
|
// Log entries with timestamps that are more than the |
|
|
|
|
// [logs retention period](https://cloud.google.com/logging/quota-policy) in |
|
|
|
|
// [logs retention period](https://cloud.google.com/logging/quotas) in |
|
|
|
|
// the past or more than 24 hours in the future will not be available when |
|
|
|
|
// calling `entries.list`. However, those log entries can still be [exported |
|
|
|
|
// with |
|
|
|
|
// LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). |
|
|
|
|
// |
|
|
|
|
// To improve throughput and to avoid exceeding the |
|
|
|
|
// [quota limit](https://cloud.google.com/logging/quota-policy) for calls to |
|
|
|
|
// [quota limit](https://cloud.google.com/logging/quotas) for calls to |
|
|
|
|
// `entries.write`, you should try to include several log entries in this |
|
|
|
|
// list, rather than calling this method for each individual log entry. |
|
|
|
|
repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; |
|
|
|
@ -258,16 +259,17 @@ message ListLogEntriesRequest { |
|
|
|
|
// Required. Names of one or more parent resources from which to |
|
|
|
|
// retrieve log entries: |
|
|
|
|
// |
|
|
|
|
// "projects/[PROJECT_ID]" |
|
|
|
|
// "organizations/[ORGANIZATION_ID]" |
|
|
|
|
// "billingAccounts/[BILLING_ACCOUNT_ID]" |
|
|
|
|
// "folders/[FOLDER_ID]" |
|
|
|
|
// * `projects/[PROJECT_ID]` |
|
|
|
|
// * `organizations/[ORGANIZATION_ID]` |
|
|
|
|
// * `billingAccounts/[BILLING_ACCOUNT_ID]` |
|
|
|
|
// * `folders/[FOLDER_ID]` |
|
|
|
|
// |
|
|
|
|
// May alternatively be one or more views: |
|
|
|
|
// |
|
|
|
|
// May alternatively be one or more views |
|
|
|
|
// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] |
|
|
|
|
// organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] |
|
|
|
|
// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] |
|
|
|
|
// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] |
|
|
|
|
// * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// |
|
|
|
|
// Projects listed in the `project_ids` field are added to this list. |
|
|
|
|
repeated string resource_names = 8 [ |
|
|
|
@ -294,10 +296,10 @@ message ListLogEntriesRequest { |
|
|
|
|
// timestamps are returned in order of their `insert_id` values. |
|
|
|
|
string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; |
|
|
|
|
|
|
|
|
|
// Optional. The maximum number of results to return from this request. |
|
|
|
|
// Default is 50. If the value is negative or exceeds 1000, |
|
|
|
|
// the request is rejected. The presence of `next_page_token` in the |
|
|
|
|
// response indicates that more results might be available. |
|
|
|
|
// Optional. The maximum number of results to return from this request. Default is 50. |
|
|
|
|
// If the value is negative or exceeds 1000, the request is rejected. The |
|
|
|
|
// presence of `next_page_token` in the response indicates that more results |
|
|
|
|
// might be available. |
|
|
|
|
int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; |
|
|
|
|
|
|
|
|
|
// Optional. If present, then retrieve the next batch of results from the |
|
|
|
@ -356,10 +358,10 @@ message ListMonitoredResourceDescriptorsResponse { |
|
|
|
|
message ListLogsRequest { |
|
|
|
|
// Required. The resource name that owns the logs: |
|
|
|
|
// |
|
|
|
|
// "projects/[PROJECT_ID]" |
|
|
|
|
// "organizations/[ORGANIZATION_ID]" |
|
|
|
|
// "billingAccounts/[BILLING_ACCOUNT_ID]" |
|
|
|
|
// "folders/[FOLDER_ID]" |
|
|
|
|
// * `projects/[PROJECT_ID]` |
|
|
|
|
// * `organizations/[ORGANIZATION_ID]` |
|
|
|
|
// * `billingAccounts/[BILLING_ACCOUNT_ID]` |
|
|
|
|
// * `folders/[FOLDER_ID]` |
|
|
|
|
string parent = 1 [ |
|
|
|
|
(google.api.field_behavior) = REQUIRED, |
|
|
|
|
(google.api.resource_reference) = { |
|
|
|
@ -379,17 +381,24 @@ message ListLogsRequest { |
|
|
|
|
string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; |
|
|
|
|
|
|
|
|
|
// Optional. The resource name that owns the logs: |
|
|
|
|
// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] |
|
|
|
|
// organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] |
|
|
|
|
// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] |
|
|
|
|
// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] |
|
|
|
|
// |
|
|
|
|
// * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// |
|
|
|
|
// To support legacy queries, it could also be: |
|
|
|
|
// "projects/[PROJECT_ID]" |
|
|
|
|
// "organizations/[ORGANIZATION_ID]" |
|
|
|
|
// "billingAccounts/[BILLING_ACCOUNT_ID]" |
|
|
|
|
// "folders/[FOLDER_ID]" |
|
|
|
|
repeated string resource_names = 8 [(google.api.field_behavior) = OPTIONAL]; |
|
|
|
|
// |
|
|
|
|
// * `projects/[PROJECT_ID]` |
|
|
|
|
// * `organizations/[ORGANIZATION_ID]` |
|
|
|
|
// * `billingAccounts/[BILLING_ACCOUNT_ID]` |
|
|
|
|
// * `folders/[FOLDER_ID]` |
|
|
|
|
repeated string resource_names = 8 [ |
|
|
|
|
(google.api.field_behavior) = OPTIONAL, |
|
|
|
|
(google.api.resource_reference) = { |
|
|
|
|
child_type: "logging.googleapis.com/Log" |
|
|
|
|
} |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Result returned from ListLogs. |
|
|
|
@ -409,16 +418,17 @@ message ListLogsResponse { |
|
|
|
|
message TailLogEntriesRequest { |
|
|
|
|
// Required. Name of a parent resource from which to retrieve log entries: |
|
|
|
|
// |
|
|
|
|
// "projects/[PROJECT_ID]" |
|
|
|
|
// "organizations/[ORGANIZATION_ID]" |
|
|
|
|
// "billingAccounts/[BILLING_ACCOUNT_ID]" |
|
|
|
|
// "folders/[FOLDER_ID]" |
|
|
|
|
// * `projects/[PROJECT_ID]` |
|
|
|
|
// * `organizations/[ORGANIZATION_ID]` |
|
|
|
|
// * `billingAccounts/[BILLING_ACCOUNT_ID]` |
|
|
|
|
// * `folders/[FOLDER_ID]` |
|
|
|
|
// |
|
|
|
|
// May alternatively be one or more views: |
|
|
|
|
// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" |
|
|
|
|
// "organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" |
|
|
|
|
// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" |
|
|
|
|
// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" |
|
|
|
|
// |
|
|
|
|
// * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
// * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` |
|
|
|
|
repeated string resource_names = 1 [(google.api.field_behavior) = REQUIRED]; |
|
|
|
|
|
|
|
|
|
// Optional. A filter that chooses which log entries to return. See [Advanced |
|
|
|
|