@ -1,4 +1,4 @@
/ / Copyright 2022 Google LLC
/ / Copyright 2023 Google LLC
/ /
/ / Licensed under the Apache License , Version 2.0 ( the "License" ) ;
/ / you may not use this file except in compliance with the License.
@ -52,18 +52,10 @@ service LoggingServiceV2 {
rpc DeleteLog ( DeleteLogRequest ) returns ( google.protobuf.Empty ) {
option ( google.api.http ) = {
delete : "/v2/{log_name=projects/*/logs/*}"
additional_bindings {
delete : "/v2/{log_name=*/*/logs/*}"
}
additional_bindings {
delete : "/v2/{log_name=organizations/*/logs/*}"
}
additional_bindings {
delete : "/v2/{log_name=folders/*/logs/*}"
}
additional_bindings {
delete : "/v2/{log_name=billingAccounts/*/logs/*}"
}
additional_bindings { delete : "/v2/{log_name=*/*/logs/*}" }
additional_bindings { delete : "/v2/{log_name=organizations/*/logs/*}" }
additional_bindings { delete : "/v2/{log_name=folders/*/logs/*}" }
additional_bindings { delete : "/v2/{log_name=billingAccounts/*/logs/*}" }
} ;
option ( google.api.method_signature ) = "log_name" ;
}
@ -75,7 +67,8 @@ service LoggingServiceV2 {
/ / A single request may contain log entries for a maximum of 1000
/ / different resources ( projects , organizations , billing accounts or
/ / folders )
rpc WriteLogEntries ( WriteLogEntriesRequest ) returns ( WriteLogEntriesResponse ) {
rpc WriteLogEntries ( WriteLogEntriesRequest )
returns ( WriteLogEntriesResponse ) {
option ( google.api.http ) = {
post : "/v2/entries:write"
body : "*"
@ -96,7 +89,8 @@ service LoggingServiceV2 {
}
/ / Lists the descriptors for monitored resource types used by Logging.
rpc ListMonitoredResourceDescriptors ( ListMonitoredResourceDescriptorsRequest ) returns ( ListMonitoredResourceDescriptorsResponse ) {
rpc ListMonitoredResourceDescriptors ( ListMonitoredResourceDescriptorsRequest )
returns ( ListMonitoredResourceDescriptorsResponse ) {
option ( google.api.http ) = {
get : "/v2/monitoredResourceDescriptors"
} ;
@ -107,17 +101,21 @@ service LoggingServiceV2 {
rpc ListLogs ( ListLogsRequest ) returns ( ListLogsResponse ) {
option ( google.api.http ) = {
get : "/v2/{parent=*/*}/logs"
additional_bindings { get : "/v2/{parent=projects/*}/logs" }
additional_bindings { get : "/v2/{parent=organizations/*}/logs" }
additional_bindings { get : "/v2/{parent=folders/*}/logs" }
additional_bindings { get : "/v2/{parent=billingAccounts/*}/logs" }
additional_bindings {
get : "/v2/{parent=projects/*}/logs"
get : "/v2/{parent=projects/*/locations/*/buckets/*/views/* }/logs"
}
additional_bindings {
get : "/v2/{parent=organizations/*}/logs"
get : "/v2/{parent=organizations/*/locations/*/buckets/*/views/* }/logs"
}
additional_bindings {
get : "/v2/{parent=folders/*}/logs"
get : "/v2/{parent=folders/*/locations/*/buckets/*/views/* }/logs"
}
additional_bindings {
get : "/v2/{parent=billingAccounts/*}/logs"
get : "/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/* }/logs"
}
} ;
option ( google.api.method_signature ) = "parent" ;
@ -125,7 +123,8 @@ service LoggingServiceV2 {
/ / Streaming read of log entries as they are ingested. Until the stream is
/ / terminated , it will continue reading logs.
rpc TailLogEntries ( stream TailLogEntriesRequest ) returns ( stream TailLogEntriesResponse ) {
rpc TailLogEntries ( stream TailLogEntriesRequest )
returns ( stream TailLogEntriesResponse ) {
option ( google.api.http ) = {
post : "/v2/entries:tail"
body : "*"
@ -150,9 +149,7 @@ message DeleteLogRequest {
/ / [ LogEntry ] [ google.logging.v2.LogEntry ] .
string log_name = 1 [
( google.api.field_behavior ) = REQUIRED ,
( google.api.resource_reference ) = {
type : "logging.googleapis.com/Log"
}
( google.api.resource_reference ) = { type : "logging.googleapis.com/Log" }
] ;
}
@ -177,9 +174,7 @@ message WriteLogEntriesRequest {
/ / individual log entry.
string log_name = 1 [
( google.api.field_behavior ) = OPTIONAL ,
( google.api.resource_reference ) = {
type : "logging.googleapis.com/Log"
}
( google.api.resource_reference ) = { type : "logging.googleapis.com/Log" }
] ;
/ / Optional. A default monitored resource object that is assigned to all log
@ -190,7 +185,8 @@ message WriteLogEntriesRequest {
/ / "zone" : "us-central1-a" , "instance_id" : "00000000000000000000" } }
/ /
/ / See [ LogEntry ] [ google.logging.v2.LogEntry ] .
google.api.MonitoredResource resource = 2 [ ( google.api.field_behavior ) = OPTIONAL ] ;
google.api.MonitoredResource resource = 2
[ ( google.api.field_behavior ) = OPTIONAL ] ;
/ / Optional. Default labels that are added to the ` labels ` field of all log
/ / entries in ` entries ` . If a log entry already has a label with the same key
@ -224,11 +220,13 @@ message WriteLogEntriesRequest {
/ / list , rather than calling this method for each individual log entry.
repeated LogEntry entries = 4 [ ( google.api.field_behavior ) = REQUIRED ] ;
/ / Optional. Whether valid entries should be written even if some other
/ / entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
/ / entry is not written , then the response status is the error associated
/ / with one of the failed entries and the response includes error details
/ / keyed by the entries ' zero - based index in the ` entries.write ` method.
/ / Optional. Whether a batch ' s valid entries should be written even if some
/ / other entry failed due to a permanent error such as INVALID_ARGUMENT or
/ / PERMISSION_DENIED. If any entry failed , then the response status is the
/ / response status of one of the failed entries. The response will include
/ / error details in ` WriteLogEntriesPartialErrors.log_entry_errors ` keyed by
/ / the entries ' zero - based index in the ` entries ` . Failed requests for which
/ / no entries are written will not include per - entry errors.
bool partial_success = 5 [ ( google.api.field_behavior ) = OPTIONAL ] ;
/ / Optional. If true , the request should expect normal response , but the
@ -238,9 +236,7 @@ message WriteLogEntriesRequest {
}
/ / Result returned from WriteLogEntries.
message WriteLogEntriesResponse {
}
message WriteLogEntriesResponse { }
/ / Error details for WriteLogEntries with partial success.
message WriteLogEntriesPartialErrors {
@ -271,6 +267,7 @@ message ListLogEntriesRequest {
/ / * ` folders / [ FOLDER_ID ] / locations / [ LOCATION_ID ] / buckets / [ BUCKET_ID ] / views / [ VIEW_ID ] `
/ /
/ / Projects listed in the ` project_ids ` field are added to this list.
/ / A maximum of 100 resources may be specified in a single request.
repeated string resource_names = 8 [
( google.api.field_behavior ) = REQUIRED ,
( google.api.resource_reference ) = {
@ -278,13 +275,11 @@ message ListLogEntriesRequest {
}
] ;
/ / Optional. A filter that chooses which log entries to return. See [ Advanced
/ / Logs Queries ] ( https : / / cloud.google.com / logging / docs / view / advanced - queries ) .
/ / Only log entries that match the filter are returned. An empty filter
/ / matches all log entries in the resources listed in ` resource_names ` .
/ / Optional. Only log entries that match the filter are returned. An empty
/ / filter matches all log entries in the resources listed in ` resource_names ` .
/ / Referencing a parent resource that is not listed in ` resource_names ` will
/ / cause the filter to return no results. The maximum length of the filter is
/ / 20000 characters.
/ / cause the filter to return no results. The maximum length of a filter is
/ / 20 , 000 characters.
string filter = 2 [ ( google.api.field_behavior ) = OPTIONAL ] ;
/ / Optional. How the results should be sorted. Presently , the only permitted
@ -295,10 +290,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 m ight be available.
int32 page_size = 4 [ ( google.api.field_behavior ) = OPTIONAL ] ;
/ / Optional. If present , then retrieve the next batch of results from the
@ -355,7 +350,7 @@ message ListMonitoredResourceDescriptorsResponse {
/ / The parameters to ListLogs.
message ListLogsRequest {
/ / Required. The resource name that owns the logs :
/ / Required. The resource name to list logs for :
/ /
/ / * ` projects / [ PROJECT_ID ] `
/ / * ` organizations / [ ORGANIZATION_ID ] `
@ -368,18 +363,7 @@ message ListLogsRequest {
}
] ;
/ / Optional. The maximum number of results to return from this request.
/ / Non - positive values are ignored. The presence of ` nextPageToken ` in the
/ / response indicates that more results might be available.
int32 page_size = 2 [ ( google.api.field_behavior ) = OPTIONAL ] ;
/ / Optional. If present , then retrieve the next batch of results from the
/ / preceding call to this method. ` pageToken ` must be the value of
/ / ` nextPageToken ` from the previous response. The values of other method
/ / parameters should be identical to those in the previous call.
string page_token = 3 [ ( google.api.field_behavior ) = OPTIONAL ] ;
/ / Optional. The resource name that owns the logs :
/ / Optional. List of resource names to list logs for :
/ /
/ / * ` projects / [ PROJECT_ID ] / locations / [ LOCATION_ID ] / buckets / [ BUCKET_ID ] / views / [ VIEW_ID ] `
/ / * ` organizations / [ ORGANIZATION_ID ] / locations / [ LOCATION_ID ] / buckets / [ BUCKET_ID ] / views / [ VIEW_ID ] `
@ -392,12 +376,25 @@ message ListLogsRequest {
/ / * ` organizations / [ ORGANIZATION_ID ] `
/ / * ` billingAccounts / [ BILLING_ACCOUNT_ID ] `
/ / * ` folders / [ FOLDER_ID ] `
/ /
/ / The resource name in the ` parent ` field is added to this list.
repeated string resource_names = 8 [
( google.api.field_behavior ) = OPTIONAL ,
( google.api.resource_reference ) = {
child_type : "logging.googleapis.com/Log"
}
] ;
/ / Optional. The maximum number of results to return from this request.
/ / Non - positive values are ignored. The presence of ` nextPageToken ` in the
/ / response indicates that more results might be available.
int32 page_size = 2 [ ( google.api.field_behavior ) = OPTIONAL ] ;
/ / Optional. If present , then retrieve the next batch of results from the
/ / preceding call to this method. ` pageToken ` must be the value of
/ / ` nextPageToken ` from the previous response. The values of other method
/ / parameters should be identical to those in the previous call.
string page_token = 3 [ ( google.api.field_behavior ) = OPTIONAL ] ;
}
/ / Result returned from ListLogs.
@ -430,20 +427,19 @@ message TailLogEntriesRequest {
/ / * ` 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
/ / Logs Filters ] ( https : / / cloud.google.com / logging / docs / view / advanced_filters ) .
/ / Only log entries that match the filter are returned. An empty filter
/ / matches all log entries in the resources listed in ` resource_names ` .
/ / Referencing a parent resource that is not in ` resource_names ` will cause
/ / the filter to return no results. The maximum length of the filter is 20000
/ / characters.
/ / Optional. Only log entries that match the filter are returned. An empty
/ / filter matches all log entries in the resources listed in ` resource_names ` .
/ / Referencing a parent resource that is not listed in ` resource_names ` will
/ / cause the filter to return no results. The maximum length of a filter is
/ / 20 , 000 characters.
string filter = 2 [ ( google.api.field_behavior ) = OPTIONAL ] ;
/ / Optional. The amount of time to buffer log entries at the server before
/ / being returned to prevent out of order results due to late arriving log
/ / entries. Valid values are between 0 - 60000 milliseconds. Defaults to 2000
/ / milliseconds.
google.protobuf.Duration buffer_window = 3 [ ( google.api.field_behavior ) = OPTIONAL ] ;
google.protobuf.Duration buffer_window = 3
[ ( google.api.field_behavior ) = OPTIONAL ] ;
}
/ / Result returned from ` TailLogEntries ` .