|
| 1 | +// Copyright 2026 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.chronicle.v1; |
| 18 | + |
| 19 | +import "google/api/annotations.proto"; |
| 20 | +import "google/api/client.proto"; |
| 21 | +import "google/api/field_behavior.proto"; |
| 22 | +import "google/api/resource.proto"; |
| 23 | +import "google/protobuf/field_mask.proto"; |
| 24 | +import "google/protobuf/timestamp.proto"; |
| 25 | + |
| 26 | +option csharp_namespace = "Google.Cloud.Chronicle.V1"; |
| 27 | +option go_package = "cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb"; |
| 28 | +option java_multiple_files = true; |
| 29 | +option java_outer_classname = "BigQueryExportProto"; |
| 30 | +option java_package = "com.google.cloud.chronicle.v1"; |
| 31 | +option php_namespace = "Google\\Cloud\\Chronicle\\V1"; |
| 32 | +option ruby_package = "Google::Cloud::Chronicle::V1"; |
| 33 | + |
| 34 | +// Service for managing BigQuery export configurations for Chronicle instances. |
| 35 | +service BigQueryExportService { |
| 36 | + option (google.api.default_host) = "chronicle.googleapis.com"; |
| 37 | + option (google.api.oauth_scopes) = |
| 38 | + "https://www.googleapis.com/auth/chronicle," |
| 39 | + "https://www.googleapis.com/auth/chronicle.readonly," |
| 40 | + "https://www.googleapis.com/auth/cloud-platform"; |
| 41 | + |
| 42 | + // Get the BigQuery export configuration for a Chronicle instance. |
| 43 | + rpc GetBigQueryExport(GetBigQueryExportRequest) returns (BigQueryExport) { |
| 44 | + option (google.api.http) = { |
| 45 | + get: "/v1/{name=projects/*/locations/*/instances/*/bigQueryExport}" |
| 46 | + }; |
| 47 | + option (google.api.method_signature) = "name"; |
| 48 | + } |
| 49 | + |
| 50 | + // Update the BigQuery export configuration for a Chronicle instance. |
| 51 | + rpc UpdateBigQueryExport(UpdateBigQueryExportRequest) |
| 52 | + returns (BigQueryExport) { |
| 53 | + option (google.api.http) = { |
| 54 | + patch: "/v1/{big_query_export.name=projects/*/locations/*/instances/*/bigQueryExport}" |
| 55 | + body: "big_query_export" |
| 56 | + }; |
| 57 | + option (google.api.method_signature) = "big_query_export,update_mask"; |
| 58 | + } |
| 59 | + |
| 60 | + // Provision the BigQuery export for a Chronicle instance. This will create |
| 61 | + // {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets |
| 62 | + // and set default export settings for each data source. |
| 63 | + rpc ProvisionBigQueryExport(ProvisionBigQueryExportRequest) |
| 64 | + returns (BigQueryExport) { |
| 65 | + option (google.api.http) = { |
| 66 | + post: "/v1/{parent=projects/*/locations/*/instances/*}/bigQueryExport:provision" |
| 67 | + body: "*" |
| 68 | + }; |
| 69 | + option (google.api.method_signature) = "parent"; |
| 70 | + } |
| 71 | +} |
| 72 | + |
| 73 | +// The BigQueryExportPackage entitled for the Chronicle instance. |
| 74 | +enum BigQueryExportPackage { |
| 75 | + // The BigQueryExportPackage is unspecified. |
| 76 | + BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED = 0; |
| 77 | + |
| 78 | + // The BigQueryExportPackage is Bring Your Own BigQuery. |
| 79 | + BIG_QUERY_EXPORT_PACKAGE_BYOBQ = 1; |
| 80 | + |
| 81 | + // The BigQueryExportPackage is Advanced BigQuery. |
| 82 | + BIG_QUERY_EXPORT_PACKAGE_ADVANCED = 2; |
| 83 | +} |
| 84 | + |
| 85 | +// The state of the latest data source export job. |
| 86 | +enum LatestExportJobState { |
| 87 | + // The latest export job state is unspecified. |
| 88 | + LATEST_EXPORT_JOB_STATE_UNSPECIFIED = 0; |
| 89 | + |
| 90 | + // The latest export job state is successful. |
| 91 | + LATEST_EXPORT_JOB_STATE_SUCCESS = 1; |
| 92 | + |
| 93 | + // The latest export job state is failed. |
| 94 | + LATEST_EXPORT_JOB_STATE_FAILED = 2; |
| 95 | +} |
| 96 | + |
| 97 | +// This resource represents the BigQuery export configuration for a Chronicle |
| 98 | +// instance which includes Google Cloud Platform resources like Cloud Storage |
| 99 | +// buckets, BigQuery datasets etc and the export settings for each data source. |
| 100 | +message BigQueryExport { |
| 101 | + option (google.api.resource) = { |
| 102 | + type: "chronicle.googleapis.com/BigQueryExport" |
| 103 | + pattern: "projects/{project}/locations/{location}/instances/{instance}/bigQueryExport" |
| 104 | + plural: "bigQueryExport" |
| 105 | + singular: "bigQueryExport" |
| 106 | + }; |
| 107 | + |
| 108 | + // Identifier. The resource name of the BigQueryExport. |
| 109 | + // Format: |
| 110 | + // projects/{project}/locations/{location}/instances/{instance}/bigQueryExport |
| 111 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 112 | + |
| 113 | + // Output only. Whether the BigQueryExport has been provisioned for the |
| 114 | + // Chronicle instance. |
| 115 | + bool provisioned = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 116 | + |
| 117 | + // Output only. The BigQueryExportPackage entitled for the Chronicle instance. |
| 118 | + BigQueryExportPackage big_query_export_package = 3 |
| 119 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 120 | + |
| 121 | + // Optional. The export settings for the Entity Graph data source. |
| 122 | + DataSourceExportSettings entity_graph_settings = 4 |
| 123 | + [(google.api.field_behavior) = OPTIONAL]; |
| 124 | + |
| 125 | + // Optional. The export settings for the IOC Matches data source. |
| 126 | + DataSourceExportSettings ioc_matches_settings = 5 |
| 127 | + [(google.api.field_behavior) = OPTIONAL]; |
| 128 | + |
| 129 | + // Optional. The export settings for the Rule Detections data source. |
| 130 | + DataSourceExportSettings rule_detections_settings = 6 |
| 131 | + [(google.api.field_behavior) = OPTIONAL]; |
| 132 | + |
| 133 | + // Optional. The export settings for the UDM Events Aggregates data source. |
| 134 | + DataSourceExportSettings udm_events_aggregates_settings = 7 |
| 135 | + [(google.api.field_behavior) = OPTIONAL]; |
| 136 | + |
| 137 | + // Optional. The export settings for the UDM Events data source. |
| 138 | + DataSourceExportSettings udm_events_settings = 8 |
| 139 | + [(google.api.field_behavior) = OPTIONAL]; |
| 140 | +} |
| 141 | + |
| 142 | +// The export settings for a data source. |
| 143 | +message DataSourceExportSettings { |
| 144 | + // Required. Whether the data source is enabled for export. |
| 145 | + bool enabled = 1 [(google.api.field_behavior) = REQUIRED]; |
| 146 | + |
| 147 | + // Required. The retention period for the data source in days. |
| 148 | + int32 retention_days = 2 [(google.api.field_behavior) = REQUIRED]; |
| 149 | + |
| 150 | + // Output only. The state of the latest data source export job. |
| 151 | + LatestExportJobState latest_export_job_state = 3 |
| 152 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 153 | + |
| 154 | + // Output only. The data freshness of the given export which represents the |
| 155 | + // time bucket at which the latest event was exported. |
| 156 | + google.protobuf.Timestamp data_freshness_time = 4 |
| 157 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 158 | + |
| 159 | + // Output only. The stored data volume of all the exports. |
| 160 | + int64 data_volume = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 161 | +} |
| 162 | + |
| 163 | +// The request message to fetch BigQuery Export configuration. |
| 164 | +message GetBigQueryExportRequest { |
| 165 | + // Required. The resource name of the BigqueryExport to retrieve. |
| 166 | + // Format: |
| 167 | + // projects/{project}/locations/{location}/instances/{instance}/bigQueryExport |
| 168 | + string name = 1 [ |
| 169 | + (google.api.field_behavior) = REQUIRED, |
| 170 | + (google.api.resource_reference) = { |
| 171 | + type: "chronicle.googleapis.com/BigQueryExport" |
| 172 | + } |
| 173 | + ]; |
| 174 | +} |
| 175 | + |
| 176 | +// The request message to update BigQuery Export configuration. |
| 177 | +message UpdateBigQueryExportRequest { |
| 178 | + // Required. The BigQueryExport settings to update. |
| 179 | + // Format: |
| 180 | + // projects/{project}/locations/{location}/instances/{instance}/bigQueryExport |
| 181 | + BigQueryExport big_query_export = 1 [(google.api.field_behavior) = REQUIRED]; |
| 182 | + |
| 183 | + // Optional. The list of fields to update. |
| 184 | + google.protobuf.FieldMask update_mask = 2 |
| 185 | + [(google.api.field_behavior) = OPTIONAL]; |
| 186 | +} |
| 187 | + |
| 188 | +// The request message to provision BigQuery Export configuration. |
| 189 | +message ProvisionBigQueryExportRequest { |
| 190 | + // Required. The instance for which BigQuery export is being provisioned. |
| 191 | + // Format: projects/{project}/locations/{location}/instances/{instance} |
| 192 | + string parent = 1 [ |
| 193 | + (google.api.field_behavior) = REQUIRED, |
| 194 | + (google.api.resource_reference) = { |
| 195 | + child_type: "chronicle.googleapis.com/BigQueryExport" |
| 196 | + } |
| 197 | + ]; |
| 198 | +} |
0 commit comments