google.logging.v2.logging_config.proto Maven / Gradle / Ivy
// Copyright (c) 2015, Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.logging.v2;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
option java_multiple_files = true;
option java_outer_classname = "LoggingConfig";
option java_package = "com.google.logging.v2";
service ConfigServiceV2 {
// Lists sinks.
rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) {
option (google.api.http) = { get: "/v2beta1/{project_name=projects/*}/sinks" };
}
// Gets a sink.
rpc GetSink(GetSinkRequest) returns (LogSink) {
option (google.api.http) = { get: "/v2beta1/{sink_name=projects/*/sinks/*}" };
}
// Creates a sink.
rpc CreateSink(CreateSinkRequest) returns (LogSink) {
option (google.api.http) = { post: "/v2beta1/{project_name=projects/*}/sinks" body: "sink" };
}
// Creates or updates a sink.
rpc UpdateSink(UpdateSinkRequest) returns (LogSink) {
option (google.api.http) = { put: "/v2beta1/{sink_name=projects/*/sinks/*}" body: "sink" };
}
// Deletes a sink.
rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { delete: "/v2beta1/{sink_name=projects/*/sinks/*}" };
}
}
// Describes a sink used to export log entries outside Cloud Logging.
message LogSink {
// Available log entry formats. Log entries can be written to Cloud
// Logging in either format and can be exported in either format.
// Version 2 is the preferred format.
enum VersionFormat {
// An unspecified version format will default to V2.
VERSION_FORMAT_UNSPECIFIED = 0;
// `LogEntry` version 2 format.
V2 = 1;
// `LogEntry` version 1 format.
V1 = 2;
}
// Required. The client-assigned sink identifier. Example:
// `"my-severe-errors-to-pubsub"`.
// Sink identifiers are limited to 1000 characters
// and can include only the following characters: `A-Z`, `a-z`,
// `0-9`, and the special characters `_-.`.
string name = 1;
// The export destination. See
// [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs).
// Examples: `"storage.googleapis.com/a-bucket"`,
// `"bigquery.googleapis.com/projects/a-project-id/datasets/a-dataset"`.
string destination = 3;
// An [advanced logs filter](/logging/docs/view/advanced_filters)
// that defines the log entries to be exported. The filter must be
// consistent with the log entry format designed by the
// `outputVersionFormat` parameter, regardless of the format of the
// log entry that was originally written to Cloud Logging.
// Example: `"logName:syslog AND severity>=ERROR"`.
string filter = 5;
// The log entry version used when exporting log entries from this
// sink. This version does not have to correspond to the version of
// the log entry when it was written to Cloud Logging.
VersionFormat output_version_format = 6;
}
// The parameters to `ListSinks`.
message ListSinksRequest {
// Required. The resource name of the project containing the sinks.
// Example: `"projects/my-logging-project"`, `"projects/01234567890"`.
string project_name = 1;
// Optional. If the `pageToken` request parameter is supplied, then the next
// page of results in the set are retrieved. The `pageToken` parameter must
// be set with the value of the `nextPageToken` result parameter from the
// previous request. The value of `projectName` must be the same as in the
// previous request.
string page_token = 2;
// Optional. The maximum number of results to return from this request. Fewer
// results might be returned. You must check for the `nextPageToken` result to
// determine if additional results are available, which you can retrieve by
// passing the `nextPageToken` value in the `pageToken` parameter to the next
// request.
int32 page_size = 3;
}
// Result returned from `ListSinks`.
message ListSinksResponse {
// A list of sinks.
repeated LogSink sinks = 1;
// If there are more results than were returned, then `nextPageToken` is
// given a value in the response. To get the next batch of results, call this
// method again using the value of `nextPageToken` as `pageToken`.
string next_page_token = 2;
}
// The parameters to `GetSink`.
message GetSinkRequest {
// The resource name of the sink to return.
// Example: `"projects/my-project-id/sinks/my-sink-id"`.
string sink_name = 1;
}
// The parameters to `CreateSink`.
message CreateSinkRequest {
// The resource name of the project in which to create the sink.
// Example: `"projects/my-project-id"`.
//
// The new sink must be provided in the request.
string project_name = 1;
// The new sink, which must not have an identifier that already
// exists.
LogSink sink = 2;
}
// The parameters to `UpdateSink`.
message UpdateSinkRequest {
// The resource name of the sink to update.
// Example: `"projects/my-project-id/sinks/my-sink-id"`.
//
// The updated sink must be provided in the request and have the
// same name that is specified in `sinkName`. If the sink does not
// exist, it is created.
string sink_name = 1;
// The updated sink, whose name must be the same as the sink
// identifier in `sinkName`. If `sinkName` does not exist, then
// this method creates a new sink.
LogSink sink = 2;
}
// The parameters to `DeleteSink`.
message DeleteSinkRequest {
// The resource name of the sink to delete.
// Example: `"projects/my-project-id/sinks/my-sink-id"`.
string sink_name = 1;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy