google-cloud-logging-v2 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Logging
23
23
  module V2
24
- # Describes a repository of logs (Beta).
24
+ # Describes a repository of logs.
25
25
  # @!attribute [rw] name
26
26
  # @return [::String]
27
27
  # The resource name of the bucket.
@@ -29,7 +29,6 @@ module Google
29
29
  # "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
30
30
  # supported locations are:
31
31
  # "global"
32
- # "us-central1"
33
32
  #
34
33
  # For the location of `global` it is unspecified where logs are actually
35
34
  # stored.
@@ -50,6 +49,11 @@ module Google
50
49
  # will automatically be deleted. The minimum retention period is 1 day.
51
50
  # If this value is set to zero at bucket creation time, the default time of
52
51
  # 30 days will be used.
52
+ # @!attribute [rw] locked
53
+ # @return [::Boolean]
54
+ # Whether the bucket has been locked.
55
+ # The retention period on a locked bucket may not be changed.
56
+ # Locked buckets may only be deleted if they are empty.
53
57
  # @!attribute [r] lifecycle_state
54
58
  # @return [::Google::Cloud::Logging::V2::LifecycleState]
55
59
  # Output only. The bucket lifecycle state.
@@ -58,6 +62,36 @@ module Google
58
62
  extend ::Google::Protobuf::MessageExts::ClassMethods
59
63
  end
60
64
 
65
+ # Describes a view over logs in a bucket.
66
+ # @!attribute [rw] name
67
+ # @return [::String]
68
+ # The resource name of the view.
69
+ # For example
70
+ # "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
71
+ # @!attribute [rw] description
72
+ # @return [::String]
73
+ # Describes this view.
74
+ # @!attribute [r] create_time
75
+ # @return [::Google::Protobuf::Timestamp]
76
+ # Output only. The creation timestamp of the view.
77
+ # @!attribute [r] update_time
78
+ # @return [::Google::Protobuf::Timestamp]
79
+ # Output only. The last update timestamp of the view.
80
+ # @!attribute [rw] filter
81
+ # @return [::String]
82
+ # Filter that restricts which log entries in a bucket are visible in this
83
+ # view. Filters are restricted to be a logical AND of ==/!= of any of the
84
+ # following:
85
+ # originating project/folder/organization/billing account.
86
+ # resource type
87
+ # log id
88
+ # Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
89
+ # AND LOG_ID("stdout")
90
+ class LogView
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
+ end
94
+
61
95
  # Describes a sink used to export log entries to one of the following
62
96
  # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
63
97
  # Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
@@ -81,12 +115,14 @@ module Google
81
115
  # The sink's `writer_identity`, set when the sink is created, must
82
116
  # have permission to write to the destination or else the log
83
117
  # entries are not exported. For more information, see
84
- # [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
118
+ # [Exporting Logs with
119
+ # Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
85
120
  # @!attribute [rw] filter
86
121
  # @return [::String]
87
- # Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only
88
- # exported log entries are those that are in the resource owning the sink and
89
- # that match the filter. For example:
122
+ # Optional. An [advanced logs
123
+ # filter](https://cloud.google.com/logging/docs/view/advanced-queries). The
124
+ # only exported log entries are those that are in the resource owning the
125
+ # sink and that match the filter. For example:
90
126
  #
91
127
  # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
92
128
  # @!attribute [rw] description
@@ -97,13 +133,17 @@ module Google
97
133
  # @return [::Boolean]
98
134
  # Optional. If set to True, then this sink is disabled and it does not
99
135
  # export any log entries.
136
+ # @!attribute [rw] exclusions
137
+ # @return [::Array<::Google::Cloud::Logging::V2::LogExclusion>]
138
+ # Optional. Log entries that match any of the exclusion filters will not be exported.
139
+ # If a log entry is matched by both `filter` and one of `exclusion_filters`
140
+ # it will not be exported.
100
141
  # @!attribute [rw] output_version_format
101
142
  # @return [::Google::Cloud::Logging::V2::LogSink::VersionFormat]
102
- # Deprecated. The log entry format to use for this sink's exported log
103
- # entries. The v2 format is used by default and cannot be changed.
143
+ # Deprecated. This field is unused.
104
144
  # @!attribute [r] writer_identity
105
145
  # @return [::String]
106
- # Output only. An IAM identitya service account or group&mdash;under which Logging
146
+ # Output only. An IAM identity&mdash;a service account or group&mdash;under which Logging
107
147
  # writes the exported log entries to the sink's destination. This field is
108
148
  # set by {::Google::Cloud::Logging::V2::ConfigServiceV2::Client#create_sink sinks.create} and
109
149
  # {::Google::Cloud::Logging::V2::ConfigServiceV2::Client#update_sink sinks.update} based on the
@@ -147,9 +187,7 @@ module Google
147
187
  include ::Google::Protobuf::MessageExts
148
188
  extend ::Google::Protobuf::MessageExts::ClassMethods
149
189
 
150
- # Available log entry formats. Log entries can be written to
151
- # Logging in either format and can be exported in either format.
152
- # Version 2 is the preferred format.
190
+ # Deprecated. This is unused.
153
191
  module VersionFormat
154
192
  # An unspecified format version that will default to V2.
155
193
  VERSION_FORMAT_UNSPECIFIED = 0
@@ -166,12 +204,13 @@ module Google
166
204
  # @!attribute [rw] use_partitioned_tables
167
205
  # @return [::Boolean]
168
206
  # Optional. Whether to use [BigQuery's partition
169
- # tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging
170
- # creates dated tables based on the log entries' timestamps, e.g.
171
- # syslog_20170523. With partitioned tables the date suffix is no longer
207
+ # tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By
208
+ # default, Logging creates dated tables based on the log entries' timestamps,
209
+ # e.g. syslog_20170523. With partitioned tables the date suffix is no longer
172
210
  # present and [special query
173
- # syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead.
174
- # In both cases, tables are sharded based on UTC timezone.
211
+ # syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables)
212
+ # has to be used instead. In both cases, tables are sharded based on UTC
213
+ # timezone.
175
214
  # @!attribute [r] uses_timestamp_column_partitioning
176
215
  # @return [::Boolean]
177
216
  # Output only. True if new timestamp column based partitioning is in use,
@@ -185,7 +224,7 @@ module Google
185
224
  extend ::Google::Protobuf::MessageExts::ClassMethods
186
225
  end
187
226
 
188
- # The parameters to `ListBuckets` (Beta).
227
+ # The parameters to `ListBuckets`.
189
228
  # @!attribute [rw] parent
190
229
  # @return [::String]
191
230
  # Required. The parent resource whose buckets are to be listed:
@@ -214,7 +253,7 @@ module Google
214
253
  extend ::Google::Protobuf::MessageExts::ClassMethods
215
254
  end
216
255
 
217
- # The response from ListBuckets (Beta).
256
+ # The response from ListBuckets.
218
257
  # @!attribute [rw] buckets
219
258
  # @return [::Array<::Google::Cloud::Logging::V2::LogBucket>]
220
259
  # A list of buckets.
@@ -228,7 +267,30 @@ module Google
228
267
  extend ::Google::Protobuf::MessageExts::ClassMethods
229
268
  end
230
269
 
231
- # The parameters to `UpdateBucket` (Beta).
270
+ # The parameters to `CreateBucket`.
271
+ # @!attribute [rw] parent
272
+ # @return [::String]
273
+ # Required. The resource in which to create the bucket:
274
+ #
275
+ # "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
276
+ #
277
+ # Example: `"projects/my-logging-project/locations/global"`
278
+ # @!attribute [rw] bucket_id
279
+ # @return [::String]
280
+ # Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
281
+ # limited to 100 characters and can include only letters, digits,
282
+ # underscores, hyphens, and periods.
283
+ # @!attribute [rw] bucket
284
+ # @return [::Google::Cloud::Logging::V2::LogBucket]
285
+ # Required. The new bucket. The region specified in the new bucket must be compliant
286
+ # with any Location Restriction Org Policy. The name field in the bucket is
287
+ # ignored.
288
+ class CreateBucketRequest
289
+ include ::Google::Protobuf::MessageExts
290
+ extend ::Google::Protobuf::MessageExts::ClassMethods
291
+ end
292
+
293
+ # The parameters to `UpdateBucket`.
232
294
  # @!attribute [rw] name
233
295
  # @return [::String]
234
296
  # Required. The full resource name of the bucket to update.
@@ -260,7 +322,7 @@ module Google
260
322
  extend ::Google::Protobuf::MessageExts::ClassMethods
261
323
  end
262
324
 
263
- # The parameters to `GetBucket` (Beta).
325
+ # The parameters to `GetBucket`.
264
326
  # @!attribute [rw] name
265
327
  # @return [::String]
266
328
  # Required. The resource name of the bucket:
@@ -277,6 +339,151 @@ module Google
277
339
  extend ::Google::Protobuf::MessageExts::ClassMethods
278
340
  end
279
341
 
342
+ # The parameters to `DeleteBucket`.
343
+ # @!attribute [rw] name
344
+ # @return [::String]
345
+ # Required. The full resource name of the bucket to delete.
346
+ #
347
+ # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
348
+ # "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
349
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
350
+ # "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
351
+ #
352
+ # Example:
353
+ # `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
354
+ class DeleteBucketRequest
355
+ include ::Google::Protobuf::MessageExts
356
+ extend ::Google::Protobuf::MessageExts::ClassMethods
357
+ end
358
+
359
+ # The parameters to `UndeleteBucket`.
360
+ # @!attribute [rw] name
361
+ # @return [::String]
362
+ # Required. The full resource name of the bucket to undelete.
363
+ #
364
+ # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
365
+ # "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
366
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
367
+ # "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
368
+ #
369
+ # Example:
370
+ # `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
371
+ class UndeleteBucketRequest
372
+ include ::Google::Protobuf::MessageExts
373
+ extend ::Google::Protobuf::MessageExts::ClassMethods
374
+ end
375
+
376
+ # The parameters to `ListViews`.
377
+ # @!attribute [rw] parent
378
+ # @return [::String]
379
+ # Required. The bucket whose views are to be listed:
380
+ #
381
+ # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
382
+ # @!attribute [rw] page_token
383
+ # @return [::String]
384
+ # Optional. If present, then retrieve the next batch of results from the
385
+ # preceding call to this method. `pageToken` must be the value of
386
+ # `nextPageToken` from the previous response. The values of other method
387
+ # parameters should be identical to those in the previous call.
388
+ # @!attribute [rw] page_size
389
+ # @return [::Integer]
390
+ # Optional. The maximum number of results to return from this request.
391
+ # Non-positive values are ignored. The presence of `nextPageToken` in the
392
+ # response indicates that more results might be available.
393
+ class ListViewsRequest
394
+ include ::Google::Protobuf::MessageExts
395
+ extend ::Google::Protobuf::MessageExts::ClassMethods
396
+ end
397
+
398
+ # The response from ListViews.
399
+ # @!attribute [rw] views
400
+ # @return [::Array<::Google::Cloud::Logging::V2::LogView>]
401
+ # A list of views.
402
+ # @!attribute [rw] next_page_token
403
+ # @return [::String]
404
+ # If there might be more results than appear in this response, then
405
+ # `nextPageToken` is included. To get the next set of results, call the same
406
+ # method again using the value of `nextPageToken` as `pageToken`.
407
+ class ListViewsResponse
408
+ include ::Google::Protobuf::MessageExts
409
+ extend ::Google::Protobuf::MessageExts::ClassMethods
410
+ end
411
+
412
+ # The parameters to `CreateView`.
413
+ # @!attribute [rw] parent
414
+ # @return [::String]
415
+ # Required. The bucket in which to create the view
416
+ #
417
+ # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
418
+ #
419
+ # Example:
420
+ # `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
421
+ # @!attribute [rw] view_id
422
+ # @return [::String]
423
+ # Required. The id to use for this view.
424
+ # @!attribute [rw] view
425
+ # @return [::Google::Cloud::Logging::V2::LogView]
426
+ # Required. The new view.
427
+ class CreateViewRequest
428
+ include ::Google::Protobuf::MessageExts
429
+ extend ::Google::Protobuf::MessageExts::ClassMethods
430
+ end
431
+
432
+ # The parameters to `UpdateView`.
433
+ # @!attribute [rw] name
434
+ # @return [::String]
435
+ # Required. The full resource name of the view to update
436
+ #
437
+ # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
438
+ #
439
+ # Example:
440
+ # `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
441
+ # @!attribute [rw] view
442
+ # @return [::Google::Cloud::Logging::V2::LogView]
443
+ # Required. The updated view.
444
+ # @!attribute [rw] update_mask
445
+ # @return [::Google::Protobuf::FieldMask]
446
+ # Optional. Field mask that specifies the fields in `view` that need
447
+ # an update. A field will be overwritten if, and only if, it is
448
+ # in the update mask. `name` and output only fields cannot be updated.
449
+ #
450
+ # For a detailed `FieldMask` definition, see
451
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
452
+ #
453
+ # Example: `updateMask=filter`.
454
+ class UpdateViewRequest
455
+ include ::Google::Protobuf::MessageExts
456
+ extend ::Google::Protobuf::MessageExts::ClassMethods
457
+ end
458
+
459
+ # The parameters to `GetView`.
460
+ # @!attribute [rw] name
461
+ # @return [::String]
462
+ # Required. The resource name of the policy:
463
+ #
464
+ # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
465
+ #
466
+ # Example:
467
+ # `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
468
+ class GetViewRequest
469
+ include ::Google::Protobuf::MessageExts
470
+ extend ::Google::Protobuf::MessageExts::ClassMethods
471
+ end
472
+
473
+ # The parameters to `DeleteView`.
474
+ # @!attribute [rw] name
475
+ # @return [::String]
476
+ # Required. The full resource name of the view to delete:
477
+ #
478
+ # "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
479
+ #
480
+ # Example:
481
+ # `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
482
+ class DeleteViewRequest
483
+ include ::Google::Protobuf::MessageExts
484
+ extend ::Google::Protobuf::MessageExts::ClassMethods
485
+ end
486
+
280
487
  # The parameters to `ListSinks`.
281
488
  # @!attribute [rw] parent
282
489
  # @return [::String]
@@ -449,9 +656,10 @@ module Google
449
656
  # Optional. A description of this exclusion.
450
657
  # @!attribute [rw] filter
451
658
  # @return [::String]
452
- # Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries)
453
- # that matches the log entries to be excluded. By using the
454
- # [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
659
+ # Required. An [advanced logs
660
+ # filter](https://cloud.google.com/logging/docs/view/advanced-queries) that
661
+ # matches the log entries to be excluded. By using the [sample
662
+ # function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
455
663
  # you can exclude less than 100% of the matching log entries.
456
664
  # For example, the following query matches 99% of low-severity log
457
665
  # entries from Google Cloud Storage buckets:
@@ -601,8 +809,9 @@ module Google
601
809
  # The parameters to
602
810
  # {::Google::Cloud::Logging::V2::ConfigServiceV2::Client#get_cmek_settings GetCmekSettings}.
603
811
  #
604
- # See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
605
- # for more information.
812
+ # See [Enabling CMEK for Logs
813
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
814
+ # more information.
606
815
  # @!attribute [rw] name
607
816
  # @return [::String]
608
817
  # Required. The resource for which to retrieve CMEK settings.
@@ -625,8 +834,9 @@ module Google
625
834
  # The parameters to
626
835
  # {::Google::Cloud::Logging::V2::ConfigServiceV2::Client#update_cmek_settings UpdateCmekSettings}.
627
836
  #
628
- # See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
629
- # for more information.
837
+ # See [Enabling CMEK for Logs
838
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
839
+ # more information.
630
840
  # @!attribute [rw] name
631
841
  # @return [::String]
632
842
  # Required. The resource name for the CMEK settings to update.
@@ -646,7 +856,8 @@ module Google
646
856
  # Required. The CMEK settings to update.
647
857
  #
648
858
  # See [Enabling CMEK for Logs
649
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
859
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
860
+ # for more information.
650
861
  # @!attribute [rw] update_mask
651
862
  # @return [::Google::Protobuf::FieldMask]
652
863
  # Optional. Field mask identifying which fields from `cmek_settings` should
@@ -668,8 +879,9 @@ module Google
668
879
  # organizations. Once configured, it applies to all projects and folders in the
669
880
  # GCP organization.
670
881
  #
671
- # See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
672
- # for more information.
882
+ # See [Enabling CMEK for Logs
883
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
884
+ # more information.
673
885
  # @!attribute [r] name
674
886
  # @return [::String]
675
887
  # Output only. The resource name of the CMEK settings.
@@ -698,7 +910,8 @@ module Google
698
910
  # To disable CMEK for the Logs Router, set this field to an empty string.
699
911
  #
700
912
  # See [Enabling CMEK for Logs
701
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
913
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
914
+ # for more information.
702
915
  # @!attribute [r] service_account_id
703
916
  # @return [::String]
704
917
  # Output only. The service account that will be used by the Logs Router to access your
@@ -711,13 +924,14 @@ module Google
711
924
  # obtain the service account ID.
712
925
  #
713
926
  # See [Enabling CMEK for Logs
714
- # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
927
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
928
+ # for more information.
715
929
  class CmekSettings
716
930
  include ::Google::Protobuf::MessageExts
717
931
  extend ::Google::Protobuf::MessageExts::ClassMethods
718
932
  end
719
933
 
720
- # LogBucket lifecycle states (Beta).
934
+ # LogBucket lifecycle states.
721
935
  module LifecycleState
722
936
  # Unspecified state. This is only used/useful for distinguishing
723
937
  # unset values.
@@ -24,8 +24,8 @@ module Google
24
24
  # Describes a logs-based metric. The value of the metric is the number of log
25
25
  # entries that match a logs filter in a given time interval.
26
26
  #
27
- # Logs-based metric can also be used to extract values from logs and create a
28
- # a distribution of the values. The distribution records the statistics of the
27
+ # Logs-based metrics can also be used to extract values from logs and create a
28
+ # distribution of the values. The distribution records the statistics of the
29
29
  # extracted values along with an optional histogram of the values as specified
30
30
  # by the bucket options.
31
31
  # @!attribute [rw] name
@@ -49,9 +49,9 @@ module Google
49
49
  # The maximum length of the description is 8000 characters.
50
50
  # @!attribute [rw] filter
51
51
  # @return [::String]
52
- # Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is
53
- # used to match log entries.
54
- # Example:
52
+ # Required. An [advanced logs
53
+ # filter](https://cloud.google.com/logging/docs/view/advanced_filters) which
54
+ # is used to match log entries. Example:
55
55
  #
56
56
  # "resource.type=gae_app AND severity>=ERROR"
57
57
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-logging-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2020-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
224
  - !ruby/object:Gem::Version
225
225
  version: '0'
226
226
  requirements: []
227
- rubygems_version: 3.1.3
227
+ rubygems_version: 3.1.4
228
228
  signing_key:
229
229
  specification_version: 4
230
230
  summary: API Client library for the Cloud Logging V2 API