Class: Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb
Overview
REST client for the StorageInsights service.
Service describing handlers for resources
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the StorageInsights Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the StorageInsights Client instance.
-
#create_dataset_config(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a dataset configuration in a given project for a given location.
-
#create_report_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::StorageInsights::V1::ReportConfig
Creates a new ReportConfig in a given project and location.
-
#delete_dataset_config(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a dataset configuration in a given project for a given location.
-
#delete_report_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a single ReportConfig.
-
#get_dataset_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::StorageInsights::V1::DatasetConfig
Gets the dataset configuration in a given project for a given location.
-
#get_report_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::StorageInsights::V1::ReportConfig
Gets details of a single ReportConfig.
-
#get_report_detail(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::StorageInsights::V1::ReportDetail
Gets details of a single ReportDetail.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new StorageInsights REST client object.
-
#link_dataset(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Links a dataset to BigQuery in a given project for a given location.
-
#list_dataset_configs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageInsights::V1::DatasetConfig>
Lists the dataset configurations in a given project for a given location.
-
#list_report_configs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageInsights::V1::ReportConfig>
Lists ReportConfigs in a given project and location.
-
#list_report_details(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageInsights::V1::ReportDetail>
Lists ReportDetails in a given project and location.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#universe_domain ⇒ String
The effective universe domain.
-
#unlink_dataset(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Unlinks a dataset from BigQuery in a given project for a given location.
-
#update_dataset_config(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates a dataset configuration in a given project for a given location.
-
#update_report_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::StorageInsights::V1::ReportConfig
Updates the parameters of a single ReportConfig.
Methods included from Paths
#dataset_config_path, #location_path, #report_config_path, #report_detail_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new StorageInsights REST client object.
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 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 179 def initialize # 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 = ::Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @storage_insights_stub = ::Google::Cloud::StorageInsights::V1::StorageInsights::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @storage_insights_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @storage_insights_stub.endpoint config.universe_domain = @storage_insights_stub.universe_domain config.bindings_override = @config.bindings_override config.logger = @storage_insights_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
249 250 251 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 249 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Operations (readonly)
Get the associated client for long-running operations.
242 243 244 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 242 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the StorageInsights Client class.
See Configuration for a description of the configuration fields.
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 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 65 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "StorageInsights", "V1"] 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.timeout = 60.0 default_config.rpcs.list_report_configs.timeout = 60.0 default_config.rpcs.list_report_configs.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_report_config.timeout = 60.0 default_config.rpcs.get_report_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_report_details.timeout = 60.0 default_config.rpcs.list_report_details.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_report_detail.timeout = 60.0 default_config.rpcs.get_report_detail.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_dataset_configs.timeout = 60.0 default_config.rpcs.list_dataset_configs.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_dataset_config.timeout = 60.0 default_config.rpcs.create_dataset_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.update_dataset_config.timeout = 60.0 default_config.rpcs.update_dataset_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.delete_dataset_config.timeout = 60.0 default_config.rpcs.delete_dataset_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.link_dataset.timeout = 60.0 default_config.rpcs.link_dataset.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.unlink_dataset.timeout = 60.0 default_config.rpcs.unlink_dataset.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the StorageInsights 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.
149 150 151 152 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 149 def configure yield @config if block_given? @config end |
#create_dataset_config(request, options = nil) ⇒ ::Gapic::Operation #create_dataset_config(parent: nil, dataset_config_id: nil, dataset_config: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a dataset configuration in a given project for a given location.
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 1163 1164 1165 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 1130 def create_dataset_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::CreateDatasetConfigRequest # 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_dataset_config..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.create_dataset_config.timeout, metadata: , retry_policy: @config.rpcs.create_dataset_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.create_dataset_config request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_report_config(request, options = nil) ⇒ ::Google::Cloud::StorageInsights::V1::ReportConfig #create_report_config(parent: nil, report_config: nil, request_id: nil) ⇒ ::Google::Cloud::StorageInsights::V1::ReportConfig
Creates a new ReportConfig in a given project and location.
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 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 492 def create_report_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::CreateReportConfigRequest # 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_report_config..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.create_report_config.timeout, metadata: , retry_policy: @config.rpcs.create_report_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.create_report_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_dataset_config(request, options = nil) ⇒ ::Gapic::Operation #delete_dataset_config(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a dataset configuration in a given project for a given location.
1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 1334 def delete_dataset_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::DeleteDatasetConfigRequest # 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_dataset_config..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.delete_dataset_config.timeout, metadata: , retry_policy: @config.rpcs.delete_dataset_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.delete_dataset_config request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_report_config(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_report_config(name: nil, force: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty
Deletes a single ReportConfig.
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 684 def delete_report_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::DeleteReportConfigRequest # 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_report_config..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.delete_report_config.timeout, metadata: , retry_policy: @config.rpcs.delete_report_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.delete_report_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_dataset_config(request, options = nil) ⇒ ::Google::Cloud::StorageInsights::V1::DatasetConfig #get_dataset_config(name: nil) ⇒ ::Google::Cloud::StorageInsights::V1::DatasetConfig
Gets the dataset configuration in a given project for a given location.
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/storage_insights/v1/storage_insights/rest/client.rb', line 1026 def get_dataset_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::GetDatasetConfigRequest # 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_dataset_config..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.get_dataset_config.timeout, metadata: , retry_policy: @config.rpcs.get_dataset_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.get_dataset_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_report_config(request, options = nil) ⇒ ::Google::Cloud::StorageInsights::V1::ReportConfig #get_report_config(name: nil) ⇒ ::Google::Cloud::StorageInsights::V1::ReportConfig
Gets details of a single ReportConfig.
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 424 425 426 427 428 429 430 431 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 398 def get_report_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::GetReportConfigRequest # 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_report_config..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.get_report_config.timeout, metadata: , retry_policy: @config.rpcs.get_report_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.get_report_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_report_detail(request, options = nil) ⇒ ::Google::Cloud::StorageInsights::V1::ReportDetail #get_report_detail(name: nil) ⇒ ::Google::Cloud::StorageInsights::V1::ReportDetail
Gets details of a single ReportDetail.
855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 855 def get_report_detail request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::GetReportDetailRequest # 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_report_detail..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.get_report_detail.timeout, metadata: , retry_policy: @config.rpcs.get_report_detail.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.get_report_detail request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#link_dataset(request, options = nil) ⇒ ::Gapic::Operation #link_dataset(name: nil) ⇒ ::Gapic::Operation
Links a dataset to BigQuery in a given project for a given location.
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 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 1421 def link_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::LinkDatasetRequest # 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.link_dataset..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.link_dataset.timeout, metadata: , retry_policy: @config.rpcs.link_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.link_dataset request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_dataset_configs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageInsights::V1::DatasetConfig> #list_dataset_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageInsights::V1::DatasetConfig>
Lists the dataset configurations in a given project for a given location.
946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 946 def list_dataset_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::ListDatasetConfigsRequest # 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_dataset_configs..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.list_dataset_configs.timeout, metadata: , retry_policy: @config.rpcs.list_dataset_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.list_dataset_configs request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @storage_insights_stub, :list_dataset_configs, "dataset_configs", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_report_configs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageInsights::V1::ReportConfig> #list_report_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageInsights::V1::ReportConfig>
Lists ReportConfigs in a given project and location.
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 318 def list_report_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::ListReportConfigsRequest # 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_report_configs..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.list_report_configs.timeout, metadata: , retry_policy: @config.rpcs.list_report_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.list_report_configs request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @storage_insights_stub, :list_report_configs, "report_configs", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_report_details(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageInsights::V1::ReportDetail> #list_report_details(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageInsights::V1::ReportDetail>
Lists ReportDetails in a given project and location.
775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 775 def list_report_details request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::ListReportDetailsRequest # 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_report_details..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.list_report_details.timeout, metadata: , retry_policy: @config.rpcs.list_report_details.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.list_report_details request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @storage_insights_stub, :list_report_details, "report_details", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
256 257 258 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 256 def logger @storage_insights_stub.logger end |
#universe_domain ⇒ String
The effective universe domain
159 160 161 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 159 def universe_domain @storage_insights_stub.universe_domain end |
#unlink_dataset(request, options = nil) ⇒ ::Gapic::Operation #unlink_dataset(name: nil) ⇒ ::Gapic::Operation
Unlinks a dataset from BigQuery in a given project for a given location.
1509 1510 1511 1512 1513 1514 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 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 1509 def unlink_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::UnlinkDatasetRequest # 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.unlink_dataset..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.unlink_dataset.timeout, metadata: , retry_policy: @config.rpcs.unlink_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.unlink_dataset request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_dataset_config(request, options = nil) ⇒ ::Gapic::Operation #update_dataset_config(update_mask: nil, dataset_config: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates a dataset configuration in a given project for a given location.
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 1235 def update_dataset_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::UpdateDatasetConfigRequest # 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_dataset_config..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.update_dataset_config.timeout, metadata: , retry_policy: @config.rpcs.update_dataset_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.update_dataset_config request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_report_config(request, options = nil) ⇒ ::Google::Cloud::StorageInsights::V1::ReportConfig #update_report_config(update_mask: nil, report_config: nil, request_id: nil) ⇒ ::Google::Cloud::StorageInsights::V1::ReportConfig
Updates the parameters of a single ReportConfig.
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/google/cloud/storage_insights/v1/storage_insights/rest/client.rb', line 590 def update_report_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageInsights::V1::UpdateReportConfigRequest # 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_report_config..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::StorageInsights::V1::VERSION, transports_version_send: [:rest] [:"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.update_report_config.timeout, metadata: , retry_policy: @config.rpcs.update_report_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_insights_stub.update_report_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |