google-cloud-logging 1.10.9 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +2 -1
  3. data/CHANGELOG.md +23 -0
  4. data/lib/google-cloud-logging.rb +14 -15
  5. data/lib/google/cloud/logging.rb +12 -13
  6. data/lib/google/cloud/logging/credentials.rb +2 -2
  7. data/lib/google/cloud/logging/entry.rb +5 -5
  8. data/lib/google/cloud/logging/entry/http_request.rb +3 -3
  9. data/lib/google/cloud/logging/entry/list.rb +1 -1
  10. data/lib/google/cloud/logging/entry/operation.rb +3 -3
  11. data/lib/google/cloud/logging/entry/source_location.rb +3 -3
  12. data/lib/google/cloud/logging/log/list.rb +1 -1
  13. data/lib/google/cloud/logging/metric.rb +2 -2
  14. data/lib/google/cloud/logging/metric/list.rb +1 -1
  15. data/lib/google/cloud/logging/resource_descriptor/list.rb +1 -1
  16. data/lib/google/cloud/logging/service.rb +70 -173
  17. data/lib/google/cloud/logging/sink.rb +2 -2
  18. data/lib/google/cloud/logging/sink/list.rb +1 -1
  19. data/lib/google/cloud/logging/version.rb +1 -1
  20. metadata +10 -80
  21. data/lib/google/cloud/logging/v2.rb +0 -18
  22. data/lib/google/cloud/logging/v2/config_service_v2_client.rb +0 -1368
  23. data/lib/google/cloud/logging/v2/config_service_v2_client_config.json +0 -106
  24. data/lib/google/cloud/logging/v2/credentials.rb +0 -39
  25. data/lib/google/cloud/logging/v2/doc/google/api/distribution.rb +0 -164
  26. data/lib/google/cloud/logging/v2/doc/google/api/label.rb +0 -42
  27. data/lib/google/cloud/logging/v2/doc/google/api/metric.rb +0 -275
  28. data/lib/google/cloud/logging/v2/doc/google/api/monitored_resource.rb +0 -118
  29. data/lib/google/cloud/logging/v2/doc/google/logging/type/http_request.rb +0 -86
  30. data/lib/google/cloud/logging/v2/doc/google/logging/v2/log_entry.rb +0 -179
  31. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging.rb +0 -238
  32. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_config.rb +0 -660
  33. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb +0 -220
  34. data/lib/google/cloud/logging/v2/doc/google/protobuf/any.rb +0 -131
  35. data/lib/google/cloud/logging/v2/doc/google/protobuf/duration.rb +0 -91
  36. data/lib/google/cloud/logging/v2/doc/google/protobuf/empty.rb +0 -29
  37. data/lib/google/cloud/logging/v2/doc/google/protobuf/field_mask.rb +0 -222
  38. data/lib/google/cloud/logging/v2/doc/google/protobuf/struct.rb +0 -74
  39. data/lib/google/cloud/logging/v2/doc/google/protobuf/timestamp.rb +0 -113
  40. data/lib/google/cloud/logging/v2/logging_service_v2_client.rb +0 -680
  41. data/lib/google/cloud/logging/v2/logging_service_v2_client_config.json +0 -61
  42. data/lib/google/cloud/logging/v2/metrics_service_v2_client.rb +0 -475
  43. data/lib/google/cloud/logging/v2/metrics_service_v2_client_config.json +0 -56
  44. data/lib/google/logging/v2/log_entry_pb.rb +0 -59
  45. data/lib/google/logging/v2/logging_config_pb.rb +0 -173
  46. data/lib/google/logging/v2/logging_config_services_pb.rb +0 -112
  47. data/lib/google/logging/v2/logging_metrics_pb.rb +0 -72
  48. data/lib/google/logging/v2/logging_metrics_services_pb.rb +0 -52
  49. data/lib/google/logging/v2/logging_pb.rb +0 -80
  50. data/lib/google/logging/v2/logging_services_pb.rb +0 -64
@@ -1,660 +0,0 @@
1
- # Copyright 2020 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
- # https://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
-
16
- module Google
17
- module Logging
18
- module V2
19
- # Describes a repository of logs (Beta).
20
- # @!attribute [rw] name
21
- # @return [String]
22
- # The resource name of the bucket.
23
- # For example:
24
- # "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
25
- # supported locations are:
26
- # "global"
27
- # "us-central1"
28
- #
29
- # For the location of `global` it is unspecified where logs are actually
30
- # stored.
31
- # Once a bucket has been created, the location can not be changed.
32
- # @!attribute [rw] description
33
- # @return [String]
34
- # Describes this bucket.
35
- # @!attribute [rw] create_time
36
- # @return [Google::Protobuf::Timestamp]
37
- # Output only. The creation timestamp of the bucket. This is not set for any of the
38
- # default buckets.
39
- # @!attribute [rw] update_time
40
- # @return [Google::Protobuf::Timestamp]
41
- # Output only. The last update timestamp of the bucket.
42
- # @!attribute [rw] retention_days
43
- # @return [Integer]
44
- # Logs will be retained by default for this amount of time, after which they
45
- # will automatically be deleted. The minimum retention period is 1 day.
46
- # If this value is set to zero at bucket creation time, the default time of
47
- # 30 days will be used.
48
- # @!attribute [rw] lifecycle_state
49
- # @return [Google::Logging::V2::LifecycleState]
50
- # Output only. The bucket lifecycle state.
51
- class LogBucket; end
52
-
53
- # Describes a sink used to export log entries to one of the following
54
- # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
55
- # Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
56
- # The sink must be created within a project, organization, billing account, or
57
- # folder.
58
- # @!attribute [rw] name
59
- # @return [String]
60
- # Required. The client-assigned sink identifier, unique within the project. Example:
61
- # `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
62
- # characters and can include only the following characters: upper and
63
- # lower-case alphanumeric characters, underscores, hyphens, and periods.
64
- # First character has to be alphanumeric.
65
- # @!attribute [rw] destination
66
- # @return [String]
67
- # Required. The export destination:
68
- #
69
- # "storage.googleapis.com/[GCS_BUCKET]"
70
- # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
71
- # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
72
- #
73
- # The sink's `writer_identity`, set when the sink is created, must
74
- # have permission to write to the destination or else the log
75
- # entries are not exported. For more information, see
76
- # [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
77
- # @!attribute [rw] filter
78
- # @return [String]
79
- # Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
80
- # exported log entries are those that are in the resource owning the sink and
81
- # that match the filter. For example:
82
- #
83
- # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
84
- # @!attribute [rw] description
85
- # @return [String]
86
- # Optional. A description of this sink.
87
- # The maximum length of the description is 8000 characters.
88
- # @!attribute [rw] disabled
89
- # @return [true, false]
90
- # Optional. If set to True, then this sink is disabled and it does not
91
- # export any log entries.
92
- # @!attribute [rw] output_version_format
93
- # @return [Google::Logging::V2::LogSink::VersionFormat]
94
- # Deprecated. The log entry format to use for this sink's exported log
95
- # entries. The v2 format is used by default and cannot be changed.
96
- # @!attribute [rw] writer_identity
97
- # @return [String]
98
- # Output only. An IAM identity–a service account or group—under which Logging
99
- # writes the exported log entries to the sink's destination. This field is
100
- # set by {Google::Logging::V2::ConfigServiceV2#create_sink} and
101
- # {Google::Logging::V2::ConfigServiceV2#update_sink} based on the
102
- # value of `unique_writer_identity` in those methods.
103
- #
104
- # Until you grant this identity write-access to the destination, log entry
105
- # exports from this sink will fail. For more information,
106
- # see [Granting Access for a
107
- # Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
108
- # Consult the destination service's documentation to determine the
109
- # appropriate IAM roles to assign to the identity.
110
- # @!attribute [rw] include_children
111
- # @return [true, false]
112
- # Optional. This field applies only to sinks owned by organizations and
113
- # folders. If the field is false, the default, only the logs owned by the
114
- # sink's parent resource are available for export. If the field is true, then
115
- # logs from all the projects, folders, and billing accounts contained in the
116
- # sink's parent resource are also available for export. Whether a particular
117
- # log entry from the children is exported depends on the sink's filter
118
- # expression. For example, if this field is true, then the filter
119
- # `resource.type=gce_instance` would export all Compute Engine VM instance
120
- # log entries from all projects in the sink's parent. To only export entries
121
- # from certain child projects, filter on the project part of the log name:
122
- #
123
- # logName:("projects/test-project1/" OR "projects/test-project2/") AND
124
- # resource.type=gce_instance
125
- # @!attribute [rw] bigquery_options
126
- # @return [Google::Logging::V2::BigQueryOptions]
127
- # Optional. Options that affect sinks exporting data to BigQuery.
128
- # @!attribute [rw] create_time
129
- # @return [Google::Protobuf::Timestamp]
130
- # Output only. The creation timestamp of the sink.
131
- #
132
- # This field may not be present for older sinks.
133
- # @!attribute [rw] update_time
134
- # @return [Google::Protobuf::Timestamp]
135
- # Output only. The last update timestamp of the sink.
136
- #
137
- # This field may not be present for older sinks.
138
- class LogSink
139
- # Available log entry formats. Log entries can be written to
140
- # Logging in either format and can be exported in either format.
141
- # Version 2 is the preferred format.
142
- module VersionFormat
143
- # An unspecified format version that will default to V2.
144
- VERSION_FORMAT_UNSPECIFIED = 0
145
-
146
- # `LogEntry` version 2 format.
147
- V2 = 1
148
-
149
- # `LogEntry` version 1 format.
150
- V1 = 2
151
- end
152
- end
153
-
154
- # Options that change functionality of a sink exporting data to BigQuery.
155
- # @!attribute [rw] use_partitioned_tables
156
- # @return [true, false]
157
- # Optional. Whether to use [BigQuery's partition
158
- # tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging
159
- # creates dated tables based on the log entries' timestamps, e.g.
160
- # syslog_20170523. With partitioned tables the date suffix is no longer
161
- # present and [special query
162
- # syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead.
163
- # In both cases, tables are sharded based on UTC timezone.
164
- # @!attribute [rw] uses_timestamp_column_partitioning
165
- # @return [true, false]
166
- # Output only. True if new timestamp column based partitioning is in use,
167
- # false if legacy ingestion-time partitioning is in use.
168
- # All new sinks will have this field set true and will use timestamp column
169
- # based partitioning. If use_partitioned_tables is false, this value has no
170
- # meaning and will be false. Legacy sinks using partitioned tables will have
171
- # this field set to false.
172
- class BigQueryOptions; end
173
-
174
- # The parameters to `ListBuckets` (Beta).
175
- # @!attribute [rw] parent
176
- # @return [String]
177
- # Required. The parent resource whose buckets are to be listed:
178
- #
179
- # "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
180
- # "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
181
- # "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
182
- # "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
183
- #
184
- # Note: The locations portion of the resource must be specified, but
185
- # supplying the character `-` in place of [LOCATION_ID] will return all
186
- # buckets.
187
- # @!attribute [rw] page_token
188
- # @return [String]
189
- # Optional. If present, then retrieve the next batch of results from the
190
- # preceding call to this method. `pageToken` must be the value of
191
- # `nextPageToken` from the previous response. The values of other method
192
- # parameters should be identical to those in the previous call.
193
- # @!attribute [rw] page_size
194
- # @return [Integer]
195
- # Optional. The maximum number of results to return from this request.
196
- # Non-positive values are ignored. The presence of `nextPageToken` in the
197
- # response indicates that more results might be available.
198
- class ListBucketsRequest; end
199
-
200
- # The response from ListBuckets (Beta).
201
- # @!attribute [rw] buckets
202
- # @return [Array<Google::Logging::V2::LogBucket>]
203
- # A list of buckets.
204
- # @!attribute [rw] next_page_token
205
- # @return [String]
206
- # If there might be more results than appear in this response, then
207
- # `nextPageToken` is included. To get the next set of results, call the same
208
- # method again using the value of `nextPageToken` as `pageToken`.
209
- class ListBucketsResponse; end
210
-
211
- # The parameters to `UpdateBucket` (Beta).
212
- # @!attribute [rw] name
213
- # @return [String]
214
- # Required. The full resource name of the bucket to update.
215
- #
216
- # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
217
- # "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
218
- # "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
219
- # "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
220
- #
221
- # Example:
222
- # `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
223
- # requires permission "resourcemanager.projects.updateLiens" to set the
224
- # locked property
225
- # @!attribute [rw] bucket
226
- # @return [Google::Logging::V2::LogBucket]
227
- # Required. The updated bucket.
228
- # @!attribute [rw] update_mask
229
- # @return [Google::Protobuf::FieldMask]
230
- # Required. Field mask that specifies the fields in `bucket` that need an update. A
231
- # bucket field will be overwritten if, and only if, it is in the update
232
- # mask. `name` and output only fields cannot be updated.
233
- #
234
- # For a detailed `FieldMask` definition, see
235
- # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
236
- #
237
- # Example: `updateMask=retention_days`.
238
- class UpdateBucketRequest; end
239
-
240
- # The parameters to `GetBucket` (Beta).
241
- # @!attribute [rw] name
242
- # @return [String]
243
- # Required. The resource name of the bucket:
244
- #
245
- # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
246
- # "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
247
- # "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
248
- # "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
249
- #
250
- # Example:
251
- # `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
252
- class GetBucketRequest; end
253
-
254
- # The parameters to `ListSinks`.
255
- # @!attribute [rw] parent
256
- # @return [String]
257
- # Required. The parent resource whose sinks are to be listed:
258
- #
259
- # "projects/[PROJECT_ID]"
260
- # "organizations/[ORGANIZATION_ID]"
261
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
262
- # "folders/[FOLDER_ID]"
263
- # @!attribute [rw] page_token
264
- # @return [String]
265
- # Optional. If present, then retrieve the next batch of results from the
266
- # preceding call to this method. `pageToken` must be the value of
267
- # `nextPageToken` from the previous response. The values of other method
268
- # parameters should be identical to those in the previous call.
269
- # @!attribute [rw] page_size
270
- # @return [Integer]
271
- # Optional. The maximum number of results to return from this request.
272
- # Non-positive values are ignored. The presence of `nextPageToken` in the
273
- # response indicates that more results might be available.
274
- class ListSinksRequest; end
275
-
276
- # Result returned from `ListSinks`.
277
- # @!attribute [rw] sinks
278
- # @return [Array<Google::Logging::V2::LogSink>]
279
- # A list of sinks.
280
- # @!attribute [rw] next_page_token
281
- # @return [String]
282
- # If there might be more results than appear in this response, then
283
- # `nextPageToken` is included. To get the next set of results, call the same
284
- # method again using the value of `nextPageToken` as `pageToken`.
285
- class ListSinksResponse; end
286
-
287
- # The parameters to `GetSink`.
288
- # @!attribute [rw] sink_name
289
- # @return [String]
290
- # Required. The resource name of the sink:
291
- #
292
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
293
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
294
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
295
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
296
- #
297
- # Example: `"projects/my-project-id/sinks/my-sink-id"`.
298
- class GetSinkRequest; end
299
-
300
- # The parameters to `CreateSink`.
301
- # @!attribute [rw] parent
302
- # @return [String]
303
- # Required. The resource in which to create the sink:
304
- #
305
- # "projects/[PROJECT_ID]"
306
- # "organizations/[ORGANIZATION_ID]"
307
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
308
- # "folders/[FOLDER_ID]"
309
- #
310
- # Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
311
- # @!attribute [rw] sink
312
- # @return [Google::Logging::V2::LogSink]
313
- # Required. The new sink, whose `name` parameter is a sink identifier that
314
- # is not already in use.
315
- # @!attribute [rw] unique_writer_identity
316
- # @return [true, false]
317
- # Optional. Determines the kind of IAM identity returned as `writer_identity`
318
- # in the new sink. If this value is omitted or set to false, and if the
319
- # sink's parent is a project, then the value returned as `writer_identity` is
320
- # the same group or service account used by Logging before the addition of
321
- # writer identities to this API. The sink's destination must be in the same
322
- # project as the sink itself.
323
- #
324
- # If this field is set to true, or if the sink is owned by a non-project
325
- # resource such as an organization, then the value of `writer_identity` will
326
- # be a unique service account used only for exports from the new sink. For
327
- # more information, see `writer_identity` in {Google::Logging::V2::LogSink LogSink}.
328
- class CreateSinkRequest; end
329
-
330
- # The parameters to `UpdateSink`.
331
- # @!attribute [rw] sink_name
332
- # @return [String]
333
- # Required. The full resource name of the sink to update, including the parent
334
- # resource and the sink identifier:
335
- #
336
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
337
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
338
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
339
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
340
- #
341
- # Example: `"projects/my-project-id/sinks/my-sink-id"`.
342
- # @!attribute [rw] sink
343
- # @return [Google::Logging::V2::LogSink]
344
- # Required. The updated sink, whose name is the same identifier that appears as part
345
- # of `sink_name`.
346
- # @!attribute [rw] unique_writer_identity
347
- # @return [true, false]
348
- # Optional. See {Google::Logging::V2::ConfigServiceV2#create_sink}
349
- # for a description of this field. When updating a sink, the effect of this
350
- # field on the value of `writer_identity` in the updated sink depends on both
351
- # the old and new values of this field:
352
- #
353
- # * If the old and new values of this field are both false or both true,
354
- # then there is no change to the sink's `writer_identity`.
355
- # * If the old value is false and the new value is true, then
356
- # `writer_identity` is changed to a unique service account.
357
- # * It is an error if the old value is true and the new value is
358
- # set to false or defaulted to false.
359
- # @!attribute [rw] update_mask
360
- # @return [Google::Protobuf::FieldMask]
361
- # Optional. Field mask that specifies the fields in `sink` that need
362
- # an update. A sink field will be overwritten if, and only if, it is
363
- # in the update mask. `name` and output only fields cannot be updated.
364
- #
365
- # An empty updateMask is temporarily treated as using the following mask
366
- # for backwards compatibility purposes:
367
- # destination,filter,includeChildren
368
- # At some point in the future, behavior will be removed and specifying an
369
- # empty updateMask will be an error.
370
- #
371
- # For a detailed `FieldMask` definition, see
372
- # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
373
- #
374
- # Example: `updateMask=filter`.
375
- class UpdateSinkRequest; end
376
-
377
- # The parameters to `DeleteSink`.
378
- # @!attribute [rw] sink_name
379
- # @return [String]
380
- # Required. The full resource name of the sink to delete, including the parent
381
- # resource and the sink identifier:
382
- #
383
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
384
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
385
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
386
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
387
- #
388
- # Example: `"projects/my-project-id/sinks/my-sink-id"`.
389
- class DeleteSinkRequest; end
390
-
391
- # Specifies a set of log entries that are not to be stored in
392
- # Logging. If your GCP resource receives a large volume of logs, you can
393
- # use exclusions to reduce your chargeable logs. Exclusions are
394
- # processed after log sinks, so you can export log entries before they are
395
- # excluded. Note that organization-level and folder-level exclusions don't
396
- # apply to child resources, and that you can't exclude audit log entries.
397
- # @!attribute [rw] name
398
- # @return [String]
399
- # Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
400
- # Identifiers are limited to 100 characters and can include only letters,
401
- # digits, underscores, hyphens, and periods. First character has to be
402
- # alphanumeric.
403
- # @!attribute [rw] description
404
- # @return [String]
405
- # Optional. A description of this exclusion.
406
- # @!attribute [rw] filter
407
- # @return [String]
408
- # Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
409
- # that matches the log entries to be excluded. By using the
410
- # [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
411
- # you can exclude less than 100% of the matching log entries.
412
- # For example, the following query matches 99% of low-severity log
413
- # entries from Google Cloud Storage buckets:
414
- #
415
- # `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
416
- # @!attribute [rw] disabled
417
- # @return [true, false]
418
- # Optional. If set to True, then this exclusion is disabled and it does not
419
- # exclude any log entries. You can [update an
420
- # exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the
421
- # value of this field.
422
- # @!attribute [rw] create_time
423
- # @return [Google::Protobuf::Timestamp]
424
- # Output only. The creation timestamp of the exclusion.
425
- #
426
- # This field may not be present for older exclusions.
427
- # @!attribute [rw] update_time
428
- # @return [Google::Protobuf::Timestamp]
429
- # Output only. The last update timestamp of the exclusion.
430
- #
431
- # This field may not be present for older exclusions.
432
- class LogExclusion; end
433
-
434
- # The parameters to `ListExclusions`.
435
- # @!attribute [rw] parent
436
- # @return [String]
437
- # Required. The parent resource whose exclusions are to be listed.
438
- #
439
- # "projects/[PROJECT_ID]"
440
- # "organizations/[ORGANIZATION_ID]"
441
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
442
- # "folders/[FOLDER_ID]"
443
- # @!attribute [rw] page_token
444
- # @return [String]
445
- # Optional. If present, then retrieve the next batch of results from the
446
- # preceding call to this method. `pageToken` must be the value of
447
- # `nextPageToken` from the previous response. The values of other method
448
- # parameters should be identical to those in the previous call.
449
- # @!attribute [rw] page_size
450
- # @return [Integer]
451
- # Optional. The maximum number of results to return from this request.
452
- # Non-positive values are ignored. The presence of `nextPageToken` in the
453
- # response indicates that more results might be available.
454
- class ListExclusionsRequest; end
455
-
456
- # Result returned from `ListExclusions`.
457
- # @!attribute [rw] exclusions
458
- # @return [Array<Google::Logging::V2::LogExclusion>]
459
- # A list of exclusions.
460
- # @!attribute [rw] next_page_token
461
- # @return [String]
462
- # If there might be more results than appear in this response, then
463
- # `nextPageToken` is included. To get the next set of results, call the same
464
- # method again using the value of `nextPageToken` as `pageToken`.
465
- class ListExclusionsResponse; end
466
-
467
- # The parameters to `GetExclusion`.
468
- # @!attribute [rw] name
469
- # @return [String]
470
- # Required. The resource name of an existing exclusion:
471
- #
472
- # "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
473
- # "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
474
- # "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
475
- # "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
476
- #
477
- # Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
478
- class GetExclusionRequest; end
479
-
480
- # The parameters to `CreateExclusion`.
481
- # @!attribute [rw] parent
482
- # @return [String]
483
- # Required. The parent resource in which to create the exclusion:
484
- #
485
- # "projects/[PROJECT_ID]"
486
- # "organizations/[ORGANIZATION_ID]"
487
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
488
- # "folders/[FOLDER_ID]"
489
- #
490
- # Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
491
- # @!attribute [rw] exclusion
492
- # @return [Google::Logging::V2::LogExclusion]
493
- # Required. The new exclusion, whose `name` parameter is an exclusion name
494
- # that is not already used in the parent resource.
495
- class CreateExclusionRequest; end
496
-
497
- # The parameters to `UpdateExclusion`.
498
- # @!attribute [rw] name
499
- # @return [String]
500
- # Required. The resource name of the exclusion to update:
501
- #
502
- # "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
503
- # "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
504
- # "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
505
- # "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
506
- #
507
- # Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
508
- # @!attribute [rw] exclusion
509
- # @return [Google::Logging::V2::LogExclusion]
510
- # Required. New values for the existing exclusion. Only the fields specified in
511
- # `update_mask` are relevant.
512
- # @!attribute [rw] update_mask
513
- # @return [Google::Protobuf::FieldMask]
514
- # Required. A non-empty list of fields to change in the existing exclusion. New values
515
- # for the fields are taken from the corresponding fields in the
516
- # {Google::Logging::V2::LogExclusion LogExclusion} included in this request. Fields not mentioned in
517
- # `update_mask` are not changed and are ignored in the request.
518
- #
519
- # For example, to change the filter and description of an exclusion,
520
- # specify an `update_mask` of `"filter,description"`.
521
- class UpdateExclusionRequest; end
522
-
523
- # The parameters to `DeleteExclusion`.
524
- # @!attribute [rw] name
525
- # @return [String]
526
- # Required. The resource name of an existing exclusion to delete:
527
- #
528
- # "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
529
- # "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
530
- # "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
531
- # "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
532
- #
533
- # Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
534
- class DeleteExclusionRequest; end
535
-
536
- # The parameters to
537
- # {Google::Cloud::Logging::V2::ConfigServiceV2Client#get_cmek_settings}.
538
- #
539
- # See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
540
- # for more information.
541
- # @!attribute [rw] name
542
- # @return [String]
543
- # Required. The resource for which to retrieve CMEK settings.
544
- #
545
- # "projects/[PROJECT_ID]/cmekSettings"
546
- # "organizations/[ORGANIZATION_ID]/cmekSettings"
547
- # "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
548
- # "folders/[FOLDER_ID]/cmekSettings"
549
- #
550
- # Example: `"organizations/12345/cmekSettings"`.
551
- #
552
- # Note: CMEK for the Logs Router can currently only be configured for GCP
553
- # organizations. Once configured, it applies to all projects and folders in
554
- # the GCP organization.
555
- class GetCmekSettingsRequest; end
556
-
557
- # The parameters to
558
- # {Google::Cloud::Logging::V2::ConfigServiceV2Client#update_cmek_settings}.
559
- #
560
- # See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
561
- # for more information.
562
- # @!attribute [rw] name
563
- # @return [String]
564
- # Required. The resource name for the CMEK settings to update.
565
- #
566
- # "projects/[PROJECT_ID]/cmekSettings"
567
- # "organizations/[ORGANIZATION_ID]/cmekSettings"
568
- # "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
569
- # "folders/[FOLDER_ID]/cmekSettings"
570
- #
571
- # Example: `"organizations/12345/cmekSettings"`.
572
- #
573
- # Note: CMEK for the Logs Router can currently only be configured for GCP
574
- # organizations. Once configured, it applies to all projects and folders in
575
- # the GCP organization.
576
- # @!attribute [rw] cmek_settings
577
- # @return [Google::Logging::V2::CmekSettings]
578
- # Required. The CMEK settings to update.
579
- #
580
- # See [Enabling CMEK for Logs
581
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
582
- # @!attribute [rw] update_mask
583
- # @return [Google::Protobuf::FieldMask]
584
- # Optional. Field mask identifying which fields from `cmek_settings` should
585
- # be updated. A field will be overwritten if and only if it is in the update
586
- # mask. Output only fields cannot be updated.
587
- #
588
- # See {Google::Protobuf::FieldMask FieldMask} for more information.
589
- #
590
- # Example: `"updateMask=kmsKeyName"`
591
- class UpdateCmekSettingsRequest; end
592
-
593
- # Describes the customer-managed encryption key (CMEK) settings associated with
594
- # a project, folder, organization, billing account, or flexible resource.
595
- #
596
- # Note: CMEK for the Logs Router can currently only be configured for GCP
597
- # organizations. Once configured, it applies to all projects and folders in the
598
- # GCP organization.
599
- #
600
- # See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
601
- # for more information.
602
- # @!attribute [rw] name
603
- # @return [String]
604
- # Output only. The resource name of the CMEK settings.
605
- # @!attribute [rw] kms_key_name
606
- # @return [String]
607
- # The resource name for the configured Cloud KMS key.
608
- #
609
- # KMS key name format:
610
- # "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
611
- #
612
- # For example:
613
- # `"projects/my-project-id/locations/my-region/keyRings/key-ring-name/cryptoKeys/key-name"`
614
- #
615
- #
616
- #
617
- # To enable CMEK for the Logs Router, set this field to a valid
618
- # `kms_key_name` for which the associated service account has the required
619
- # `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key.
620
- #
621
- # The Cloud KMS key used by the Log Router can be updated by changing the
622
- # `kms_key_name` to a new valid key name. Encryption operations that are in
623
- # progress will be completed with the key that was in use when they started.
624
- # Decryption operations will be completed using the key that was used at the
625
- # time of encryption unless access to that key has been revoked.
626
- #
627
- # To disable CMEK for the Logs Router, set this field to an empty string.
628
- #
629
- # See [Enabling CMEK for Logs
630
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
631
- # @!attribute [rw] service_account_id
632
- # @return [String]
633
- # Output only. The service account that will be used by the Logs Router to access your
634
- # Cloud KMS key.
635
- #
636
- # Before enabling CMEK for Logs Router, you must first assign the role
637
- # `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
638
- # the Logs Router will use to access your Cloud KMS key. Use
639
- # {Google::Cloud::Logging::V2::ConfigServiceV2Client#get_cmek_settings} to
640
- # obtain the service account ID.
641
- #
642
- # See [Enabling CMEK for Logs
643
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
644
- class CmekSettings; end
645
-
646
- # LogBucket lifecycle states (Beta).
647
- module LifecycleState
648
- # Unspecified state. This is only used/useful for distinguishing
649
- # unset values.
650
- LIFECYCLE_STATE_UNSPECIFIED = 0
651
-
652
- # The normal and active state.
653
- ACTIVE = 1
654
-
655
- # The bucket has been marked for deletion by the user.
656
- DELETE_REQUESTED = 2
657
- end
658
- end
659
- end
660
- end