google-cloud-logging 1.10.2 → 1.10.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3ff009393cbd979b24ec55b77e9a01ace67e83cd85fbf2515744fe17c3a2eb4
4
- data.tar.gz: 94f7be31be064dfdf28606eb61fa12a14cc04d4a437cc8586860270ed2f365a9
3
+ metadata.gz: bcf1cecc45e21a908822e15ae13b14ee5b110e460f61c743442af832e35b3d03
4
+ data.tar.gz: 4328a9236c7380894d39281f14906e6a21a5623bf5f9e1a5823b9407be4891ee
5
5
  SHA512:
6
- metadata.gz: b9cce3e3f7bbfe109934fa366b0115eba10669823d57141566eefeb8f0399dd87c97c69468697bfc3fe81d8f5b62f177dbdd88b40136c20be554dc89908e7a71
7
- data.tar.gz: 228de2d91c3417de0680ba1ecc65e6ced7dbba967f87ef3ae01bcfd6ba0e720ef32dcb892a6703214a3f2f046c3be65d42e8dc2f3753c5b930ccca575e30ffbb
6
+ metadata.gz: a5cfe2ab82077f691c247e91380c12e9ac632e5ea00cf95af069e93d6d2b20c300a80218c0fe8834785180b52660f8871d0ad0840f1fd343706d903680433326
7
+ data.tar.gz: e6ad1dd7d86df9605d3b2fd466ae386ac9115962ad43e2dc568bbbf6c8216f37a06ea184764629baa0c9632db487058847f9c9202be2facb0b5209530df31bfa
@@ -1,5 +1,35 @@
1
1
  # Release History
2
2
 
3
+ ### 1.10.7 / 2020-05-28
4
+
5
+ #### Documentation
6
+
7
+ * Fix a few broken links
8
+
9
+ ### 1.10.6 / 2020-05-19
10
+
11
+ #### Bug Fixes
12
+
13
+ * Adjusted some default timeout and retry settings
14
+
15
+ ### 1.10.5 / 2020-05-05
16
+
17
+ #### Bug Fixes
18
+
19
+ * Prevent error when calling stop! on unused AsyncWriter
20
+
21
+ ### 1.10.4 / 2020-04-20
22
+
23
+ #### Documentation
24
+
25
+ * Fix some broken links in the Project and Sink docs
26
+
27
+ ### 1.10.3 / 2020-04-06
28
+
29
+ #### Documentation
30
+
31
+ * Fix some broken links in the low-level interface documentation.
32
+
3
33
  ### 1.10.2 / 2020-04-01
4
34
 
5
35
  #### Bug Fixes
@@ -24,14 +24,8 @@ improved, *please* create a new issue on GitHub so we can talk about it.
24
24
 
25
25
  - [New issue][gh-ruby]
26
26
 
27
- Or, you can ask questions on the [Google Cloud Platform Slack][slack-ruby]. You
28
- can use the "ruby" channel for general Ruby questions, or use the
29
- "google-cloud-ruby" channel if you have questions about this gem in particular.
30
-
31
27
  [so-ruby]: http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby+logging
32
28
 
33
- [gh-search-ruby]: https://github.com/googlecloudplatform/google-cloud-ruby/issues?q=label%3A%22api%3A+logging%22
34
-
35
- [gh-ruby]: https://github.com/googlecloudplatform/google-cloud-ruby/issues/new
29
+ [gh-search-ruby]: https://github.com/googleapis/google-cloud-ruby/issues?q=label%3A%22api%3A+logging%22
36
30
 
37
- [slack-ruby]: https://gcp-slack.appspot.com/
31
+ [gh-ruby]: https://github.com/googleapis/google-cloud-ruby/issues/new
@@ -155,7 +155,7 @@ module Google
155
155
  max_threads: @threads, max_queue: @max_queue
156
156
  @thread ||= Thread.new { run_background }
157
157
 
158
- publish_batch! if @batch.ready?
158
+ publish_batch! if @batch&.ready?
159
159
 
160
160
  @cond.broadcast
161
161
  end
@@ -222,6 +222,10 @@ module Google
222
222
  # writer. To stop the writer, first call {#stop} and then call {#wait!}
223
223
  # to block until the writer is stopped.
224
224
  #
225
+ # @param [Number, nil] timeout The maximum number of seconds to wait for
226
+ # shutdown to complete. Will wait forever when the value is `nil`. The
227
+ # default value is `nil`.
228
+ #
225
229
  # @return [AsyncWriter] returns self so calls can be chained.
226
230
  def wait! timeout = nil
227
231
  synchronize do
@@ -237,18 +241,22 @@ module Google
237
241
  ##
238
242
  # Stop this asynchronous writer and block until it has been stopped.
239
243
  #
240
- # @param [Number] timeout Timeout in seconds.
244
+ # @param [Number, nil] timeout The maximum number of seconds to wait for
245
+ # shutdown to complete. Will wait forever when the value is `nil`. The
246
+ # default value is `nil`.
241
247
  # @param [Boolean] force If set to true, and the writer hasn't stopped
242
- # within the given timeout, kill it forcibly by terminating the
243
- # thread. This should be used with extreme caution, as it can
244
- # leave RPCs unfinished. Default is false.
248
+ # within the given timeout, kill it forcibly by terminating the
249
+ # thread. This should be used with extreme caution, as it can
250
+ # leave RPCs unfinished. Default is false.
245
251
  #
246
- # @return [Symbol] Returns `:stopped` if the AsyncWriter was already
247
- # stopped at the time of invocation, `:waited` if it stopped
248
- # during the timeout period, `:timeout` if it is still running
249
- # after the timeout, or `:forced` if it was forcibly killed.
252
+ # @return [Symbol] Returns `:new` if {#write_entries} has never been
253
+ # called on the AsyncWriter, `:stopped` if it was already stopped
254
+ # at the time of invocation, `:waited` if it stopped during the
255
+ # timeout period, `:timeout` if it is still running after the
256
+ # timeout, or `:forced` if it was forcibly killed.
250
257
  #
251
258
  def stop! timeout = nil, force: nil
259
+ return :new unless @thread_pool
252
260
  return :stopped if stopped?
253
261
 
254
262
  stop
@@ -515,7 +515,7 @@ module Google
515
515
  # Retrieves the list of monitored resource descriptors that are used by
516
516
  # Stackdriver Logging.
517
517
  #
518
- # @see https://cloud.google.com/logging/docs/api/introduction_v2#monitored_resources
518
+ # @see https://cloud.google.com/logging/docs/api/v2/resource-list
519
519
  # Monitored Resources
520
520
  #
521
521
  # @param [String] token A previously-returned page token representing
@@ -621,18 +621,15 @@ module Google
621
621
  # does not send previously-ingested log entries to the sink's
622
622
  # destination.
623
623
  #
624
- # Before creating the sink, ensure that you have granted
625
- # `cloud-logs@google.com` permission to write logs to the destination.
626
- # See [Permissions for writing exported
627
- # logs](https://cloud.google.com/logging/docs/export/configure_export#setting_product_name_short_permissions_for_writing_exported_logs).
628
- #
629
- # @see https://cloud.google.com/logging/docs/api/tasks/exporting-logs
630
- # Exporting Logs With Sinks
631
- # @see https://cloud.google.com/logging/docs/api/introduction_v2#kinds_of_log_sinks
632
- # Kinds of log sinks (API V2)
633
- # @see https://cloud.google.com/logging/docs/api/#sinks Sinks (API V1)
634
- # @see https://cloud.google.com/logging/docs/export/configure_export#setting_product_name_short_permissions_for_writing_exported_logs
635
- # Permissions for writing exported logs
624
+ # Before creating the sink, ensure that you have granted the sink's
625
+ # _unique writer identity_ permission to write logs to the destination.
626
+ # See [Destination
627
+ # permissions](https://cloud.google.com/logging/docs/export/configure_export_v2#dest-auth).
628
+ #
629
+ # @see https://cloud.google.com/logging/docs/export
630
+ # Overview of logs exports
631
+ # @see https://cloud.google.com/logging/docs/reference/v2/rpc/google.logging.v2#configservicev2
632
+ # ConfigService API which includes sink methods
636
633
  #
637
634
  # @overload create_sink(name, destination, filter: nil, unique_writer_identity: nil)
638
635
  # @param [String] name The client-assigned sink identifier. Sink
@@ -27,20 +27,17 @@ module Google
27
27
  #
28
28
  # A logs filter controls which log entries are exported.
29
29
  #
30
- # Before creating the sink, ensure that you have granted
31
- # `cloud-logs@google.com` permission to write logs to the destination. See
32
- # [Permissions for writing exported
33
- # logs](https://cloud.google.com/logging/docs/export/configure_export#setting_product_name_short_permissions_for_writing_exported_logs).
30
+ # Before creating the sink, ensure that you have granted the sink's
31
+ # _unique writer identity_ permission to write logs to the destination.
32
+ # See [Destination
33
+ # permissions](https://cloud.google.com/logging/docs/export/configure_export_v2#dest-auth).
34
34
  #
35
35
  # You can retrieve an existing sink with {Project#sink}.
36
36
  #
37
- # @see https://cloud.google.com/logging/docs/api/tasks/exporting-logs
38
- # Exporting Logs With Sinks
39
- # @see https://cloud.google.com/logging/docs/api/introduction_v2#kinds_of_log_sinks
40
- # Kinds of log sinks (API V2)
41
- # @see https://cloud.google.com/logging/docs/api/#sinks Sinks (API V1)
42
- # @see https://cloud.google.com/logging/docs/export/configure_export#setting_product_name_short_permissions_for_writing_exported_logs
43
- # Permissions for writing exported logs
37
+ # @see https://cloud.google.com/logging/docs/export
38
+ # Overview of logs exports
39
+ # @see https://cloud.google.com/logging/docs/reference/v2/rpc/google.logging.v2#configservicev2
40
+ # ConfigService API which includes sink methods
44
41
  #
45
42
  # @example
46
43
  # require "google/cloud/storage"
@@ -83,22 +80,22 @@ module Google
83
80
  end
84
81
 
85
82
  ##
86
- # The export destination. See [Exporting Logs With
87
- # Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
83
+ # The export destination. See [Properties of
84
+ # Sinks](https://cloud.google.com/logging/docs/export#sink-terms).
88
85
  def destination
89
86
  @grpc.destination
90
87
  end
91
88
 
92
89
  ##
93
- # Updates the export destination. See [Exporting Logs With
94
- # Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
90
+ # Updates the export destination. See [Properties of
91
+ # Sinks](https://cloud.google.com/logging/docs/export#sink-terms).
95
92
  def destination= destination
96
93
  @grpc.destination = destination
97
94
  end
98
95
 
99
96
  ##
100
97
  # An [advanced logs
101
- # filter](https://cloud.google.com/logging/docs/view/advanced_filters)
98
+ # filter](https://cloud.google.com/logging/docs/view/advanced-queries)
102
99
  # that defines the log entries to be exported. The filter must be
103
100
  # consistent with the log entry format designed by the `version`
104
101
  # parameter, regardless of the format of the log entry that was
@@ -109,7 +106,7 @@ module Google
109
106
 
110
107
  ##
111
108
  # Updates the [advanced logs
112
- # filter](https://cloud.google.com/logging/docs/view/advanced_filters)
109
+ # filter](https://cloud.google.com/logging/docs/view/advanced-queries)
113
110
  # that defines the log entries to be exported. The filter must be
114
111
  # consistent with the log entry format designed by the `version`
115
112
  # parameter, regardless of the format of the log entry that was
@@ -388,6 +388,30 @@ module Google
388
388
  &Google::Logging::V2::ConfigServiceV2::Stub.method(:new)
389
389
  )
390
390
 
391
+ @delete_sink = Google::Gax.create_api_call(
392
+ @config_service_v2_stub.method(:delete_sink),
393
+ defaults["delete_sink"],
394
+ exception_transformer: exception_transformer,
395
+ params_extractor: proc do |request|
396
+ {'sink_name' => request.sink_name}
397
+ end
398
+ )
399
+ @update_sink = Google::Gax.create_api_call(
400
+ @config_service_v2_stub.method(:update_sink),
401
+ defaults["update_sink"],
402
+ exception_transformer: exception_transformer,
403
+ params_extractor: proc do |request|
404
+ {'sink_name' => request.sink_name}
405
+ end
406
+ )
407
+ @delete_exclusion = Google::Gax.create_api_call(
408
+ @config_service_v2_stub.method(:delete_exclusion),
409
+ defaults["delete_exclusion"],
410
+ exception_transformer: exception_transformer,
411
+ params_extractor: proc do |request|
412
+ {'name' => request.name}
413
+ end
414
+ )
391
415
  @list_buckets = Google::Gax.create_api_call(
392
416
  @config_service_v2_stub.method(:list_buckets),
393
417
  defaults["list_buckets"],
@@ -436,22 +460,6 @@ module Google
436
460
  {'parent' => request.parent}
437
461
  end
438
462
  )
439
- @update_sink = Google::Gax.create_api_call(
440
- @config_service_v2_stub.method(:update_sink),
441
- defaults["update_sink"],
442
- exception_transformer: exception_transformer,
443
- params_extractor: proc do |request|
444
- {'sink_name' => request.sink_name}
445
- end
446
- )
447
- @delete_sink = Google::Gax.create_api_call(
448
- @config_service_v2_stub.method(:delete_sink),
449
- defaults["delete_sink"],
450
- exception_transformer: exception_transformer,
451
- params_extractor: proc do |request|
452
- {'sink_name' => request.sink_name}
453
- end
454
- )
455
463
  @list_exclusions = Google::Gax.create_api_call(
456
464
  @config_service_v2_stub.method(:list_exclusions),
457
465
  defaults["list_exclusions"],
@@ -484,14 +492,6 @@ module Google
484
492
  {'name' => request.name}
485
493
  end
486
494
  )
487
- @delete_exclusion = Google::Gax.create_api_call(
488
- @config_service_v2_stub.method(:delete_exclusion),
489
- defaults["delete_exclusion"],
490
- exception_transformer: exception_transformer,
491
- params_extractor: proc do |request|
492
- {'name' => request.name}
493
- end
494
- )
495
495
  @get_cmek_settings = Google::Gax.create_api_call(
496
496
  @config_service_v2_stub.method(:get_cmek_settings),
497
497
  defaults["get_cmek_settings"],
@@ -512,6 +512,173 @@ module Google
512
512
 
513
513
  # Service calls
514
514
 
515
+ # Deletes a sink. If the sink has a unique `writer_identity`, then that
516
+ # service account is also deleted.
517
+ #
518
+ # @param sink_name [String]
519
+ # Required. The full resource name of the sink to delete, including the parent
520
+ # resource and the sink identifier:
521
+ #
522
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
523
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
524
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
525
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
526
+ #
527
+ # Example: `"projects/my-project-id/sinks/my-sink-id"`.
528
+ # @param options [Google::Gax::CallOptions]
529
+ # Overrides the default settings for this call, e.g, timeout,
530
+ # retries, etc.
531
+ # @yield [result, operation] Access the result along with the RPC operation
532
+ # @yieldparam result []
533
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
534
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
535
+ # @example
536
+ # require "google/cloud/logging/v2"
537
+ #
538
+ # config_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
539
+ #
540
+ # # TODO: Initialize `sink_name`:
541
+ # sink_name = ''
542
+ # config_client.delete_sink(sink_name)
543
+
544
+ def delete_sink \
545
+ sink_name,
546
+ options: nil,
547
+ &block
548
+ req = {
549
+ sink_name: sink_name
550
+ }.delete_if { |_, v| v.nil? }
551
+ req = Google::Gax::to_proto(req, Google::Logging::V2::DeleteSinkRequest)
552
+ @delete_sink.call(req, options, &block)
553
+ nil
554
+ end
555
+
556
+ # Updates a sink. This method replaces the following fields in the existing
557
+ # sink with values from the new sink: `destination`, and `filter`.
558
+ #
559
+ # The updated sink might also have a new `writer_identity`; see the
560
+ # `unique_writer_identity` field.
561
+ #
562
+ # @param sink_name [String]
563
+ # Required. The full resource name of the sink to update, including the parent
564
+ # resource and the sink identifier:
565
+ #
566
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
567
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
568
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
569
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
570
+ #
571
+ # Example: `"projects/my-project-id/sinks/my-sink-id"`.
572
+ # @param sink [Google::Logging::V2::LogSink | Hash]
573
+ # Required. The updated sink, whose name is the same identifier that appears as part
574
+ # of `sink_name`.
575
+ # A hash of the same form as `Google::Logging::V2::LogSink`
576
+ # can also be provided.
577
+ # @param unique_writer_identity [true, false]
578
+ # Optional. See {Google::Logging::V2::ConfigServiceV2#create_sink}
579
+ # for a description of this field. When updating a sink, the effect of this
580
+ # field on the value of `writer_identity` in the updated sink depends on both
581
+ # the old and new values of this field:
582
+ #
583
+ # * If the old and new values of this field are both false or both true,
584
+ # then there is no change to the sink's `writer_identity`.
585
+ # * If the old value is false and the new value is true, then
586
+ # `writer_identity` is changed to a unique service account.
587
+ # * It is an error if the old value is true and the new value is
588
+ # set to false or defaulted to false.
589
+ # @param update_mask [Google::Protobuf::FieldMask | Hash]
590
+ # Optional. Field mask that specifies the fields in `sink` that need
591
+ # an update. A sink field will be overwritten if, and only if, it is
592
+ # in the update mask. `name` and output only fields cannot be updated.
593
+ #
594
+ # An empty updateMask is temporarily treated as using the following mask
595
+ # for backwards compatibility purposes:
596
+ # destination,filter,includeChildren
597
+ # At some point in the future, behavior will be removed and specifying an
598
+ # empty updateMask will be an error.
599
+ #
600
+ # For a detailed `FieldMask` definition, see
601
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
602
+ #
603
+ # Example: `updateMask=filter`.
604
+ # A hash of the same form as `Google::Protobuf::FieldMask`
605
+ # can also be provided.
606
+ # @param options [Google::Gax::CallOptions]
607
+ # Overrides the default settings for this call, e.g, timeout,
608
+ # retries, etc.
609
+ # @yield [result, operation] Access the result along with the RPC operation
610
+ # @yieldparam result [Google::Logging::V2::LogSink]
611
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
612
+ # @return [Google::Logging::V2::LogSink]
613
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
614
+ # @example
615
+ # require "google/cloud/logging/v2"
616
+ #
617
+ # config_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
618
+ #
619
+ # # TODO: Initialize `sink_name`:
620
+ # sink_name = ''
621
+ #
622
+ # # TODO: Initialize `sink`:
623
+ # sink = {}
624
+ # response = config_client.update_sink(sink_name, sink)
625
+
626
+ def update_sink \
627
+ sink_name,
628
+ sink,
629
+ unique_writer_identity: nil,
630
+ update_mask: nil,
631
+ options: nil,
632
+ &block
633
+ req = {
634
+ sink_name: sink_name,
635
+ sink: sink,
636
+ unique_writer_identity: unique_writer_identity,
637
+ update_mask: update_mask
638
+ }.delete_if { |_, v| v.nil? }
639
+ req = Google::Gax::to_proto(req, Google::Logging::V2::UpdateSinkRequest)
640
+ @update_sink.call(req, options, &block)
641
+ end
642
+
643
+ # Deletes an exclusion.
644
+ #
645
+ # @param name [String]
646
+ # Required. The resource name of an existing exclusion to delete:
647
+ #
648
+ # "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
649
+ # "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
650
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
651
+ # "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
652
+ #
653
+ # Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
654
+ # @param options [Google::Gax::CallOptions]
655
+ # Overrides the default settings for this call, e.g, timeout,
656
+ # retries, etc.
657
+ # @yield [result, operation] Access the result along with the RPC operation
658
+ # @yieldparam result []
659
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
660
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
661
+ # @example
662
+ # require "google/cloud/logging/v2"
663
+ #
664
+ # config_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
665
+ #
666
+ # # TODO: Initialize `name`:
667
+ # name = ''
668
+ # config_client.delete_exclusion(name)
669
+
670
+ def delete_exclusion \
671
+ name,
672
+ options: nil,
673
+ &block
674
+ req = {
675
+ name: name
676
+ }.delete_if { |_, v| v.nil? }
677
+ req = Google::Gax::to_proto(req, Google::Logging::V2::DeleteExclusionRequest)
678
+ @delete_exclusion.call(req, options, &block)
679
+ nil
680
+ end
681
+
515
682
  # Lists buckets (Beta).
516
683
  #
517
684
  # @param parent [String]
@@ -854,134 +1021,6 @@ module Google
854
1021
  @create_sink.call(req, options, &block)
855
1022
  end
856
1023
 
857
- # Updates a sink. This method replaces the following fields in the existing
858
- # sink with values from the new sink: `destination`, and `filter`.
859
- #
860
- # The updated sink might also have a new `writer_identity`; see the
861
- # `unique_writer_identity` field.
862
- #
863
- # @param sink_name [String]
864
- # Required. The full resource name of the sink to update, including the parent
865
- # resource and the sink identifier:
866
- #
867
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
868
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
869
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
870
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
871
- #
872
- # Example: `"projects/my-project-id/sinks/my-sink-id"`.
873
- # @param sink [Google::Logging::V2::LogSink | Hash]
874
- # Required. The updated sink, whose name is the same identifier that appears as part
875
- # of `sink_name`.
876
- # A hash of the same form as `Google::Logging::V2::LogSink`
877
- # can also be provided.
878
- # @param unique_writer_identity [true, false]
879
- # Optional. See {Google::Logging::V2::ConfigServiceV2#create_sink}
880
- # for a description of this field. When updating a sink, the effect of this
881
- # field on the value of `writer_identity` in the updated sink depends on both
882
- # the old and new values of this field:
883
- #
884
- # * If the old and new values of this field are both false or both true,
885
- # then there is no change to the sink's `writer_identity`.
886
- # * If the old value is false and the new value is true, then
887
- # `writer_identity` is changed to a unique service account.
888
- # * It is an error if the old value is true and the new value is
889
- # set to false or defaulted to false.
890
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
891
- # Optional. Field mask that specifies the fields in `sink` that need
892
- # an update. A sink field will be overwritten if, and only if, it is
893
- # in the update mask. `name` and output only fields cannot be updated.
894
- #
895
- # An empty updateMask is temporarily treated as using the following mask
896
- # for backwards compatibility purposes:
897
- # destination,filter,includeChildren
898
- # At some point in the future, behavior will be removed and specifying an
899
- # empty updateMask will be an error.
900
- #
901
- # For a detailed `FieldMask` definition, see
902
- # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
903
- #
904
- # Example: `updateMask=filter`.
905
- # A hash of the same form as `Google::Protobuf::FieldMask`
906
- # can also be provided.
907
- # @param options [Google::Gax::CallOptions]
908
- # Overrides the default settings for this call, e.g, timeout,
909
- # retries, etc.
910
- # @yield [result, operation] Access the result along with the RPC operation
911
- # @yieldparam result [Google::Logging::V2::LogSink]
912
- # @yieldparam operation [GRPC::ActiveCall::Operation]
913
- # @return [Google::Logging::V2::LogSink]
914
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
915
- # @example
916
- # require "google/cloud/logging/v2"
917
- #
918
- # config_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
919
- #
920
- # # TODO: Initialize `sink_name`:
921
- # sink_name = ''
922
- #
923
- # # TODO: Initialize `sink`:
924
- # sink = {}
925
- # response = config_client.update_sink(sink_name, sink)
926
-
927
- def update_sink \
928
- sink_name,
929
- sink,
930
- unique_writer_identity: nil,
931
- update_mask: nil,
932
- options: nil,
933
- &block
934
- req = {
935
- sink_name: sink_name,
936
- sink: sink,
937
- unique_writer_identity: unique_writer_identity,
938
- update_mask: update_mask
939
- }.delete_if { |_, v| v.nil? }
940
- req = Google::Gax::to_proto(req, Google::Logging::V2::UpdateSinkRequest)
941
- @update_sink.call(req, options, &block)
942
- end
943
-
944
- # Deletes a sink. If the sink has a unique `writer_identity`, then that
945
- # service account is also deleted.
946
- #
947
- # @param sink_name [String]
948
- # Required. The full resource name of the sink to delete, including the parent
949
- # resource and the sink identifier:
950
- #
951
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
952
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
953
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
954
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
955
- #
956
- # Example: `"projects/my-project-id/sinks/my-sink-id"`.
957
- # @param options [Google::Gax::CallOptions]
958
- # Overrides the default settings for this call, e.g, timeout,
959
- # retries, etc.
960
- # @yield [result, operation] Access the result along with the RPC operation
961
- # @yieldparam result []
962
- # @yieldparam operation [GRPC::ActiveCall::Operation]
963
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
964
- # @example
965
- # require "google/cloud/logging/v2"
966
- #
967
- # config_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
968
- #
969
- # # TODO: Initialize `sink_name`:
970
- # sink_name = ''
971
- # config_client.delete_sink(sink_name)
972
-
973
- def delete_sink \
974
- sink_name,
975
- options: nil,
976
- &block
977
- req = {
978
- sink_name: sink_name
979
- }.delete_if { |_, v| v.nil? }
980
- req = Google::Gax::to_proto(req, Google::Logging::V2::DeleteSinkRequest)
981
- @delete_sink.call(req, options, &block)
982
- nil
983
- end
984
-
985
1024
  # Lists all the exclusions in a parent resource.
986
1025
  #
987
1026
  # @param parent [String]
@@ -1193,45 +1232,6 @@ module Google
1193
1232
  @update_exclusion.call(req, options, &block)
1194
1233
  end
1195
1234
 
1196
- # Deletes an exclusion.
1197
- #
1198
- # @param name [String]
1199
- # Required. The resource name of an existing exclusion to delete:
1200
- #
1201
- # "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
1202
- # "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
1203
- # "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
1204
- # "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
1205
- #
1206
- # Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
1207
- # @param options [Google::Gax::CallOptions]
1208
- # Overrides the default settings for this call, e.g, timeout,
1209
- # retries, etc.
1210
- # @yield [result, operation] Access the result along with the RPC operation
1211
- # @yieldparam result []
1212
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1213
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
1214
- # @example
1215
- # require "google/cloud/logging/v2"
1216
- #
1217
- # config_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
1218
- #
1219
- # # TODO: Initialize `name`:
1220
- # name = ''
1221
- # config_client.delete_exclusion(name)
1222
-
1223
- def delete_exclusion \
1224
- name,
1225
- options: nil,
1226
- &block
1227
- req = {
1228
- name: name
1229
- }.delete_if { |_, v| v.nil? }
1230
- req = Google::Gax::to_proto(req, Google::Logging::V2::DeleteExclusionRequest)
1231
- @delete_exclusion.call(req, options, &block)
1232
- nil
1233
- end
1234
-
1235
1235
  # Gets the Logs Router CMEK settings for the given resource.
1236
1236
  #
1237
1237
  # Note: CMEK for the Logs Router can currently only be configured for GCP
@@ -1239,7 +1239,7 @@ module Google
1239
1239
  # the GCP organization.
1240
1240
  #
1241
1241
  # See [Enabling CMEK for Logs
1242
- # Router](/logging/docs/routing/managed-encryption) for more information.
1242
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
1243
1243
  #
1244
1244
  # @param name [String]
1245
1245
  # Required. The resource for which to retrieve CMEK settings.
@@ -1295,7 +1295,7 @@ module Google
1295
1295
  # 3) access to the key is disabled.
1296
1296
  #
1297
1297
  # See [Enabling CMEK for Logs
1298
- # Router](/logging/docs/routing/managed-encryption) for more information.
1298
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
1299
1299
  #
1300
1300
  # @param name [String]
1301
1301
  # Required. The resource name for the CMEK settings to update.
@@ -1314,7 +1314,7 @@ module Google
1314
1314
  # Required. The CMEK settings to update.
1315
1315
  #
1316
1316
  # See [Enabling CMEK for Logs
1317
- # Router](/logging/docs/routing/managed-encryption) for more information.
1317
+ # Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
1318
1318
  # A hash of the same form as `Google::Logging::V2::CmekSettings`
1319
1319
  # can also be provided.
1320
1320
  # @param update_mask [Google::Protobuf::FieldMask | Hash]