From 7986ea8763dea6ff92c276bfc85bdcdeec39059e Mon Sep 17 00:00:00 2001 From: Google APIs Date: Tue, 5 May 2026 02:12:13 -0700 Subject: [PATCH] feat: add Ingestion Log Service v1beta libraries PiperOrigin-RevId: 910532527 --- google/cloud/chronicle/v1beta/BUILD.bazel | 3 + .../chronicle/v1beta/chronicle_v1beta.yaml | 7 + .../chronicle_v1beta_grpc_service_config.json | 6 +- .../chronicle/v1beta/ingestion_log.proto | 188 ++++++++++++++++++ 4 files changed, 201 insertions(+), 3 deletions(-) create mode 100644 google/cloud/chronicle/v1beta/ingestion_log.proto diff --git a/google/cloud/chronicle/v1beta/BUILD.bazel b/google/cloud/chronicle/v1beta/BUILD.bazel index d06361a5a2..d5c8a9d3b8 100644 --- a/google/cloud/chronicle/v1beta/BUILD.bazel +++ b/google/cloud/chronicle/v1beta/BUILD.bazel @@ -41,6 +41,7 @@ proto_library( "findings_refinement.proto", "forwarder.proto", "ingestion.proto", + "ingestion_log.proto", "instance.proto", "ioc.proto", "log.proto", @@ -160,6 +161,8 @@ java_gapic_test( "com.google.cloud.chronicle.v1beta.FindingsRefinementServiceClientTest", "com.google.cloud.chronicle.v1beta.ForwarderServiceClientHttpJsonTest", "com.google.cloud.chronicle.v1beta.ForwarderServiceClientTest", + "com.google.cloud.chronicle.v1beta.IngestionLogServiceClientHttpJsonTest", + "com.google.cloud.chronicle.v1beta.IngestionLogServiceClientTest", "com.google.cloud.chronicle.v1beta.IngestionServiceClientHttpJsonTest", "com.google.cloud.chronicle.v1beta.IngestionServiceClientTest", "com.google.cloud.chronicle.v1beta.InstanceServiceClientHttpJsonTest", diff --git a/google/cloud/chronicle/v1beta/chronicle_v1beta.yaml b/google/cloud/chronicle/v1beta/chronicle_v1beta.yaml index 43253cd5d5..3bd4bfe5c4 100644 --- a/google/cloud/chronicle/v1beta/chronicle_v1beta.yaml +++ b/google/cloud/chronicle/v1beta/chronicle_v1beta.yaml @@ -19,6 +19,7 @@ apis: - name: google.cloud.chronicle.v1beta.FeedsService - name: google.cloud.chronicle.v1beta.FindingsRefinementService - name: google.cloud.chronicle.v1beta.ForwarderService +- name: google.cloud.chronicle.v1beta.IngestionLogService - name: google.cloud.chronicle.v1beta.IngestionService - name: google.cloud.chronicle.v1beta.InstanceService - name: google.cloud.chronicle.v1beta.IocService @@ -152,6 +153,12 @@ authentication: https://www.googleapis.com/auth/chronicle, https://www.googleapis.com/auth/chronicle.readonly, https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.chronicle.v1beta.IngestionLogService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/chronicle, + https://www.googleapis.com/auth/chronicle.readonly, + https://www.googleapis.com/auth/cloud-platform - selector: 'google.cloud.chronicle.v1beta.FeaturedContentNativeDashboardService.*' oauth: canonical_scopes: |- diff --git a/google/cloud/chronicle/v1beta/chronicle_v1beta_grpc_service_config.json b/google/cloud/chronicle/v1beta/chronicle_v1beta_grpc_service_config.json index e4af647d82..99a8be478d 100644 --- a/google/cloud/chronicle/v1beta/chronicle_v1beta_grpc_service_config.json +++ b/google/cloud/chronicle/v1beta/chronicle_v1beta_grpc_service_config.json @@ -314,8 +314,7 @@ { "service": "google.cloud.chronicle.v1beta.IngestionService", "method": "ImportLogs" } ], "timeout": "120s" - }, - { + } ,{ "name": [ { "service": "google.cloud.chronicle.v1beta.ForwarderService", "method": "GetForwarder" }, { "service": "google.cloud.chronicle.v1beta.ForwarderService", "method": "ListForwarders" }, @@ -338,7 +337,8 @@ { "service": "google.cloud.chronicle.v1beta.ForwarderService", "method": "DeleteForwarder" }, { "service": "google.cloud.chronicle.v1beta.ForwarderService", "method": "CreateCollector" }, { "service": "google.cloud.chronicle.v1beta.ForwarderService", "method": "UpdateCollector" }, - { "service": "google.cloud.chronicle.v1beta.ForwarderService", "method": "DeleteCollector" } + { "service": "google.cloud.chronicle.v1beta.ForwarderService", "method": "DeleteCollector" }, + { "service": "google.cloud.chronicle.v1beta.ForwarderService", "method": "ImportStatsEvents" } ], "timeout": "60s" }, diff --git a/google/cloud/chronicle/v1beta/ingestion_log.proto b/google/cloud/chronicle/v1beta/ingestion_log.proto new file mode 100644 index 0000000000..c64f6f3c0c --- /dev/null +++ b/google/cloud/chronicle/v1beta/ingestion_log.proto @@ -0,0 +1,188 @@ +// Copyright 2026 Google LLC +// +// 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.cloud.chronicle.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.Chronicle.V1Beta"; +option go_package = "cloud.google.com/go/chronicle/apiv1beta/chroniclepb;chroniclepb"; +option java_multiple_files = true; +option java_outer_classname = "IngestionLogProto"; +option java_package = "com.google.cloud.chronicle.v1beta"; +option php_namespace = "Google\\Cloud\\Chronicle\\V1beta"; +option ruby_package = "Google::Cloud::Chronicle::V1beta"; + +// IngestionLogService exposes resources and endpoints related to +// ingestion log namespaces, label keys, label values and banned labels. +service IngestionLogService { + option (google.api.default_host) = "chronicle.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/chronicle," + "https://www.googleapis.com/auth/chronicle.readonly," + "https://www.googleapis.com/auth/cloud-platform"; + + // Returns the ingestion log labels for the customer. + rpc ListIngestionLogLabels(ListIngestionLogLabelsRequest) + returns (ListIngestionLogLabelsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/instances/*}/ingestionLogLabels" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists ingestion log namespaces for the customer. + rpc ListIngestionLogNamespaces(ListIngestionLogNamespacesRequest) + returns (ListIngestionLogNamespacesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/instances/*}/ingestionLogNamespaces" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Fields from ingestion log label. +enum LabelView { + // Populate all fields if no view is specified. + LABEL_VIEW_UNSPECIFIED = 0; + + // Populate keys field. + LABEL_VIEW_KEY = 1; + + // Populate values field. + LABEL_VIEW_VALUE = 2; + + // Populate all fields. + LABEL_VIEW_FULL = 3; +} + +// A IngestionLogLabel is a label on raw log to define user access to data. +message IngestionLogLabel { + option (google.api.resource) = { + type: "chronicle.googleapis.com/IngestionLogLabel" + pattern: "projects/{project}/locations/{location}/instances/{instance}/ingestionLogLabels/{ingestion_log_label}" + plural: "ingestionLogLabels" + singular: "ingestionLogLabel" + }; + + // Identifier. The unique name of the Ingestion Label. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Represents whether the label is banned. + bool banned = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Represents the per customer ingestion label key. + string key = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Ingestion label value. + string value = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A IngestionLogNamespace is a namespace on raw log to define user access to +// data. +message IngestionLogNamespace { + option (google.api.resource) = { + type: "chronicle.googleapis.com/IngestionLogNamespace" + pattern: "projects/{project}/locations/{location}/instances/{instance}/ingestionLogNamespaces/{ingestion_log_namespace}" + plural: "ingestionLogNamespaces" + singular: "ingestionLogNamespace" + }; + + // Identifier. The unique name of the Ingestion log namespace. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Request message for ListIngestionLogLabels +message ListIngestionLogLabelsRequest { + // Required. The parent resource owning the ingestion labels + // Format: projects/{project}/locations/{location}/instances/{instance} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/IngestionLogLabel" + } + ]; + + // Optional. Filter uses AIP-160 expression syntax, where only `key` and + // `banned` fields can be used in filter expression, following are example + // filters + // * filter `banned = true` to get banned labels + // * filter `key = ` to get labels with specified key + // * empty filter returns all labels + // filter complexity is limited to simpler expressions as mentioned above with + // some OR or AND expressions. + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. concerned fields from ingestion log label + LabelView view = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of labels to return. The service may return + // fewer than this value. If unspecified, at most 100 labels will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListIngestionLogLabels` + // call. Provide this to retrieve the subsequent page. All fields (except + // `page_size`) need to match the previous call. In particular, `filter` and + // `view` need to match. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListIngestionLogLabels +message ListIngestionLogLabelsResponse { + // Holds the ingestion log labels for the customer. + repeated IngestionLogLabel ingestion_log_labels = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListIngestionLogNamespaces +message ListIngestionLogNamespacesRequest { + // Required. The parent resource owning the ingestion namespaces + // Format: projects/{project}/locations/{location}/instances/{instance} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/IngestionLogNamespace" + } + ]; + + // Optional. The maximum number of namespaces to return. The service may + // return fewer than this value. If unspecified, at most 100 namespaces will + // be returned. The maximum value is 1000; values above 1000 will be coerced + // to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListIngestionLogNamespaces` call. Provide this to retrieve the subsequent + // page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListIngestionLogNamespaces +message ListIngestionLogNamespacesResponse { + // Holds the ingestion log namespaces for the customer. + repeated IngestionLogNamespace ingestion_log_namespaces = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +}