Class: Google::Cloud::Logging::V2::ConfigService::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Logging::V2::ConfigService::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/logging/v2/config_service/client.rb
Overview
Client for the ConfigService service.
Service for configuring sinks used to route log entries.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#operations_client ⇒ ::Google::Cloud::Logging::V2::ConfigService::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the ConfigService Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the ConfigService Client instance.
-
#copy_log_entries(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Copies a set of log entries from a log bucket to a Cloud Storage bucket.
-
#create_bucket(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogBucket
Creates a log bucket that can be used to store log entries.
-
#create_bucket_async(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a log bucket asynchronously that can be used to store log entries.
-
#create_exclusion(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogExclusion
Creates a new exclusion in the _Default sink in a specified parent resource.
-
#create_link(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket.
-
#create_sink(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogSink
Creates a sink that exports specified log entries to a destination.
-
#create_view(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogView
Creates a view over log entries in a log bucket.
-
#delete_bucket(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a log bucket.
-
#delete_exclusion(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes an exclusion in the _Default sink.
-
#delete_link(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes a link.
-
#delete_sink(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a sink.
-
#delete_view(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a view on a log bucket.
-
#get_bucket(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogBucket
Gets a log bucket.
-
#get_cmek_settings(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::CmekSettings
Gets the Logging CMEK settings for the given resource.
-
#get_exclusion(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogExclusion
Gets the description of an exclusion in the _Default sink.
-
#get_link(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::Link
Gets a link.
-
#get_settings(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::Settings
Gets the Log Router settings for the given resource.
-
#get_sink(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogSink
Gets a sink.
-
#get_view(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogView
Gets a view on a log bucket..
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new ConfigService client object.
-
#list_buckets(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogBucket>
Lists log buckets.
-
#list_exclusions(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogExclusion>
Lists all the exclusions on the _Default sink in a parent resource.
-
#list_links(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::Link>
Lists links.
-
#list_sinks(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogSink>
Lists sinks.
-
#list_views(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogView>
Lists views on a log bucket.
-
#undelete_bucket(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Undeletes a log bucket.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_bucket(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogBucket
Updates a log bucket.
-
#update_bucket_async(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Updates a log bucket asynchronously.
-
#update_cmek_settings(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::CmekSettings
Updates the Log Router CMEK settings for the given resource.
-
#update_exclusion(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogExclusion
Changes one or more properties of an existing exclusion in the _Default sink.
-
#update_settings(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::Settings
Updates the Log Router settings for the given resource.
-
#update_sink(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogSink
Updates a sink.
-
#update_view(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Logging::V2::LogView
Updates a view on a log bucket.
Methods included from Paths
#billing_account_location_path, #billing_account_path, #cmek_settings_path, #folder_location_path, #folder_path, #link_path, #location_path, #log_bucket_path, #log_exclusion_path, #log_sink_path, #log_view_path, #organization_location_path, #organization_path, #project_path, #settings_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new ConfigService client object.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 165 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/logging/v2/logging_config_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @config_service_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::Logging::V2::ConfigServiceV2::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool ) end |
Instance Attribute Details
#operations_client ⇒ ::Google::Cloud::Logging::V2::ConfigService::Operations (readonly)
Get the associated client for long-running operations.
217 218 219 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 217 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the ConfigService Client class.
See Configuration for a description of the configuration fields.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 62 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Logging", "V2"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.list_sinks.timeout = 60.0 default_config.rpcs.list_sinks.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14] } default_config.rpcs.get_sink.timeout = 60.0 default_config.rpcs.get_sink.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14] } default_config.rpcs.create_sink.timeout = 120.0 default_config.rpcs.update_sink.timeout = 60.0 default_config.rpcs.update_sink.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14] } default_config.rpcs.delete_sink.timeout = 60.0 default_config.rpcs.delete_sink.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14] } default_config.rpcs.list_exclusions.timeout = 60.0 default_config.rpcs.list_exclusions.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14] } default_config.rpcs.get_exclusion.timeout = 60.0 default_config.rpcs.get_exclusion.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14] } default_config.rpcs.create_exclusion.timeout = 120.0 default_config.rpcs.update_exclusion.timeout = 120.0 default_config.rpcs.delete_exclusion.timeout = 60.0 default_config.rpcs.delete_exclusion.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the ConfigService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
135 136 137 138 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 135 def configure yield @config if block_given? @config end |
#copy_log_entries(request, options = nil) ⇒ ::Gapic::Operation #copy_log_entries(name: nil, filter: nil, destination: nil) ⇒ ::Gapic::Operation
Copies a set of log entries from a log bucket to a Cloud Storage bucket.
3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 3535 def copy_log_entries request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::CopyLogEntriesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.copy_log_entries..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.copy_log_entries.timeout, metadata: , retry_policy: @config.rpcs.copy_log_entries.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :copy_log_entries, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_bucket(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogBucket #create_bucket(parent: nil, bucket_id: nil, bucket: nil) ⇒ ::Google::Cloud::Logging::V2::LogBucket
Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.
713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 713 def create_bucket request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::CreateBucketRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_bucket..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_bucket.timeout, metadata: , retry_policy: @config.rpcs.create_bucket.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :create_bucket, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_bucket_async(request, options = nil) ⇒ ::Gapic::Operation #create_bucket_async(parent: nil, bucket_id: nil, bucket: nil) ⇒ ::Gapic::Operation
Creates a log bucket asynchronously that can be used to store log entries.
After a bucket has been created, the bucket's location cannot be changed.
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 492 def create_bucket_async request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::CreateBucketRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_bucket_async..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_bucket_async.timeout, metadata: , retry_policy: @config.rpcs.create_bucket_async.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :create_bucket_async, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_exclusion(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogExclusion #create_exclusion(parent: nil, exclusion: nil) ⇒ ::Google::Cloud::Logging::V2::LogExclusion
Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.
2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2760 def create_exclusion request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::CreateExclusionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_exclusion..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_exclusion.timeout, metadata: , retry_policy: @config.rpcs.create_exclusion.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :create_exclusion, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_link(request, options = nil) ⇒ ::Gapic::Operation #create_link(parent: nil, link: nil, link_id: nil) ⇒ ::Gapic::Operation
Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link.
2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2165 def create_link request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::CreateLinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_link..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_link.timeout, metadata: , retry_policy: @config.rpcs.create_link.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :create_link, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_sink(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogSink #create_sink(parent: nil, sink: nil, unique_writer_identity: nil) ⇒ ::Google::Cloud::Logging::V2::LogSink
Creates a sink that exports specified log entries to a destination. The
export of newly-ingested log entries begins immediately, unless the sink's
writer_identity
is not permitted to write to the destination. A sink can
export log entries only from the resource owning the sink.
1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1830 def create_sink request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::CreateSinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_sink..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_sink.timeout, metadata: , retry_policy: @config.rpcs.create_sink.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :create_sink, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_view(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogView #create_view(parent: nil, view_id: nil, view: nil) ⇒ ::Google::Cloud::Logging::V2::LogView
Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.
1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1313 def create_view request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::CreateViewRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_view..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_view.timeout, metadata: , retry_policy: @config.rpcs.create_view.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :create_view, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_bucket(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_bucket(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a log bucket.
Changes the bucket's lifecycle_state
to the DELETE_REQUESTED
state.
After 7 days, the bucket will be purged and all log entries in the bucket
will be permanently deleted.
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 923 def delete_bucket request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::DeleteBucketRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_bucket..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_bucket.timeout, metadata: , retry_policy: @config.rpcs.delete_bucket.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :delete_bucket, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_exclusion(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_exclusion(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes an exclusion in the _Default sink.
2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2963 def delete_exclusion request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::DeleteExclusionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_exclusion..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_exclusion.timeout, metadata: , retry_policy: @config.rpcs.delete_exclusion.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :delete_exclusion, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_link(request, options = nil) ⇒ ::Gapic::Operation #delete_link(name: nil) ⇒ ::Gapic::Operation
Deletes a link. This will also delete the corresponding BigQuery linked dataset.
2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2265 def delete_link request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::DeleteLinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_link..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_link.timeout, metadata: , retry_policy: @config.rpcs.delete_link.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :delete_link, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_sink(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_sink(sink_name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a sink. If the sink has a unique writer_identity
, then that
service account is also deleted.
2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2059 def delete_sink request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::DeleteSinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_sink..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.sink_name header_params["sink_name"] = request.sink_name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_sink.timeout, metadata: , retry_policy: @config.rpcs.delete_sink.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :delete_sink, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_view(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_view(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a view on a log bucket.
If an UNAVAILABLE
error is returned, this indicates that system is not in
a state where it can delete the view. If this occurs, please try again in a
few minutes.
1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1515 def delete_view request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::DeleteViewRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_view..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_view.timeout, metadata: , retry_policy: @config.rpcs.delete_view.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :delete_view, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_bucket(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogBucket #get_bucket(name: nil) ⇒ ::Google::Cloud::Logging::V2::LogBucket
Gets a log bucket.
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 383 def get_bucket request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::GetBucketRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_bucket..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_bucket.timeout, metadata: , retry_policy: @config.rpcs.get_bucket.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :get_bucket, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_cmek_settings(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::CmekSettings #get_cmek_settings(name: nil) ⇒ ::Google::Cloud::Logging::V2::CmekSettings
Gets the Logging CMEK settings for the given resource.
Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.
See Enabling CMEK for Log Router for more information.
3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 3072 def get_cmek_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::GetCmekSettingsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_cmek_settings..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_cmek_settings.timeout, metadata: , retry_policy: @config.rpcs.get_cmek_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :get_cmek_settings, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_exclusion(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogExclusion #get_exclusion(name: nil) ⇒ ::Google::Cloud::Logging::V2::LogExclusion
Gets the description of an exclusion in the _Default sink.
2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2659 def get_exclusion request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::GetExclusionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_exclusion..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_exclusion.timeout, metadata: , retry_policy: @config.rpcs.get_exclusion.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :get_exclusion, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_link(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::Link #get_link(name: nil) ⇒ ::Google::Cloud::Logging::V2::Link
Gets a link.
2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2459 def get_link request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::GetLinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_link..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_link.timeout, metadata: , retry_policy: @config.rpcs.get_link.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :get_link, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_settings(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::Settings #get_settings(name: nil) ⇒ ::Google::Cloud::Logging::V2::Settings
Gets the Log Router settings for the given resource.
Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.
See Enabling CMEK for Log Router for more information.
3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 3308 def get_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::GetSettingsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_settings..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_settings.timeout, metadata: , retry_policy: @config.rpcs.get_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :get_settings, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_sink(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogSink #get_sink(sink_name: nil) ⇒ ::Google::Cloud::Logging::V2::LogSink
Gets a sink.
1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1715 def get_sink request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::GetSinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_sink..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.sink_name header_params["sink_name"] = request.sink_name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_sink.timeout, metadata: , retry_policy: @config.rpcs.get_sink.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :get_sink, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_view(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogView #get_view(name: nil) ⇒ ::Google::Cloud::Logging::V2::LogView
Gets a view on a log bucket..
1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1214 def get_view request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::GetViewRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_view..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_view.timeout, metadata: , retry_policy: @config.rpcs.get_view.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :get_view, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_buckets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogBucket> #list_buckets(parent: nil, page_token: nil, page_size: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogBucket>
Lists log buckets.
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 287 def list_buckets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::ListBucketsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_buckets..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_buckets.timeout, metadata: , retry_policy: @config.rpcs.list_buckets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :list_buckets, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_buckets, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_exclusions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogExclusion> #list_exclusions(parent: nil, page_token: nil, page_size: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogExclusion>
Lists all the exclusions on the _Default sink in a parent resource.
2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2563 def list_exclusions request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::ListExclusionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_exclusions..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_exclusions.timeout, metadata: , retry_policy: @config.rpcs.list_exclusions.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :list_exclusions, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_exclusions, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::Link> #list_links(parent: nil, page_token: nil, page_size: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::Link>
Lists links.
2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2367 def list_links request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::ListLinksRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_links..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_links.timeout, metadata: , retry_policy: @config.rpcs.list_links.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :list_links, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_links, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_sinks(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogSink> #list_sinks(parent: nil, page_token: nil, page_size: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogSink>
Lists sinks.
1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1619 def list_sinks request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::ListSinksRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_sinks..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_sinks.timeout, metadata: , retry_policy: @config.rpcs.list_sinks.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :list_sinks, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_sinks, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_views(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogView> #list_views(parent: nil, page_token: nil, page_size: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogView>
Lists views on a log bucket.
1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1121 def list_views request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::ListViewsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_views..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_views.timeout, metadata: , retry_policy: @config.rpcs.list_views.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :list_views, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_views, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#undelete_bucket(request, options = nil) ⇒ ::Google::Protobuf::Empty #undelete_bucket(name: nil) ⇒ ::Google::Protobuf::Empty
Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.
1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1019 def undelete_bucket request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::UndeleteBucketRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.undelete_bucket..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.undelete_bucket.timeout, metadata: , retry_policy: @config.rpcs.undelete_bucket.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :undelete_bucket, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
145 146 147 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 145 def universe_domain @config_service_stub.universe_domain end |
#update_bucket(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogBucket #update_bucket(name: nil, bucket: nil, update_mask: nil) ⇒ ::Google::Cloud::Logging::V2::LogBucket
Updates a log bucket.
If the bucket has a lifecycle_state
of DELETE_REQUESTED
, then
FAILED_PRECONDITION
will be returned.
After a bucket has been created, the bucket's location cannot be changed.
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 824 def update_bucket request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::UpdateBucketRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_bucket..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_bucket.timeout, metadata: , retry_policy: @config.rpcs.update_bucket.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :update_bucket, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_bucket_async(request, options = nil) ⇒ ::Gapic::Operation #update_bucket_async(name: nil, bucket: nil, update_mask: nil) ⇒ ::Gapic::Operation
Updates a log bucket asynchronously.
If the bucket has a lifecycle_state
of DELETE_REQUESTED
, then
FAILED_PRECONDITION
will be returned.
After a bucket has been created, the bucket's location cannot be changed.
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 611 def update_bucket_async request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::UpdateBucketRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_bucket_async..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_bucket_async.timeout, metadata: , retry_policy: @config.rpcs.update_bucket_async.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :update_bucket_async, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_cmek_settings(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::CmekSettings #update_cmek_settings(name: nil, cmek_settings: nil, update_mask: nil) ⇒ ::Google::Cloud::Logging::V2::CmekSettings
Updates the Log Router CMEK settings for the given resource.
Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.
UpdateCmekSettings
will fail if 1) kms_key_name
is invalid, or 2) the associated service
account does not have the required
roles/cloudkms.cryptoKeyEncrypterDecrypter
role assigned for the key, or
3) access to the key is disabled.
See Enabling CMEK for Log Router for more information.
3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 3199 def update_cmek_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::UpdateCmekSettingsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_cmek_settings..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_cmek_settings.timeout, metadata: , retry_policy: @config.rpcs.update_cmek_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :update_cmek_settings, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_exclusion(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogExclusion #update_exclusion(name: nil, exclusion: nil, update_mask: nil) ⇒ ::Google::Cloud::Logging::V2::LogExclusion
Changes one or more properties of an existing exclusion in the _Default sink.
2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 2868 def update_exclusion request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::UpdateExclusionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_exclusion..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_exclusion.timeout, metadata: , retry_policy: @config.rpcs.update_exclusion.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :update_exclusion, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_settings(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::Settings #update_settings(name: nil, settings: nil, update_mask: nil) ⇒ ::Google::Cloud::Logging::V2::Settings
Updates the Log Router settings for the given resource.
Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.
UpdateSettings
will fail if 1) kms_key_name
is invalid, or 2) the associated service
account does not have the required
roles/cloudkms.cryptoKeyEncrypterDecrypter
role assigned for the key, or
3) access to the key is disabled. 4) location_id
is not supported by
Logging. 5) location_id
violate OrgPolicy.
See Enabling CMEK for Log Router for more information.
3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 3433 def update_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::UpdateSettingsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_settings..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_settings.timeout, metadata: , retry_policy: @config.rpcs.update_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :update_settings, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_sink(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogSink #update_sink(sink_name: nil, sink: nil, unique_writer_identity: nil, update_mask: nil) ⇒ ::Google::Cloud::Logging::V2::LogSink
Updates a sink. This method replaces the following fields in the existing
sink with values from the new sink: destination
, and filter
.
The updated sink might also have a new writer_identity
; see the
unique_writer_identity
field.
1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1962 def update_sink request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::UpdateSinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_sink..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.sink_name header_params["sink_name"] = request.sink_name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_sink.timeout, metadata: , retry_policy: @config.rpcs.update_sink.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :update_sink, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_view(request, options = nil) ⇒ ::Google::Cloud::Logging::V2::LogView #update_view(name: nil, view: nil, update_mask: nil) ⇒ ::Google::Cloud::Logging::V2::LogView
Updates a view on a log bucket. This method replaces the following fields
in the existing view with values from the new view: filter
.
If an UNAVAILABLE
error is returned, this indicates that system is not in
a state where it can update the view. If this occurs, please try again in a
few minutes.
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 |
# File 'lib/google/cloud/logging/v2/config_service/client.rb', line 1420 def update_view request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Logging::V2::UpdateViewRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_view..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Logging::V2::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_view.timeout, metadata: , retry_policy: @config.rpcs.update_view.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_service_stub.call_rpc :update_view, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |