google-cloud-spanner-admin-instance-v1 1.3.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c12a23a53590ba4b88196b0e358b59623c2f9d7c00290540ddaf9e26ed94c43
4
- data.tar.gz: dade9c8f576e31c8f36d4bfc55f7b55cbd781dda356c8d7496235a49fc0a7333
3
+ metadata.gz: ffefb9b2f53566b7a1daf8189189bf0d48be02a21bb0c874edea7fadc2b97ff2
4
+ data.tar.gz: 439a5e7ddaf7359a7fdaaa27aa20eef8ba06ef20891f14f80c20326e963c143b
5
5
  SHA512:
6
- metadata.gz: b43d70df84753c1db2cb98eccbb9e6a99080a9509d772c3fe84e65443c26df24fccec3b34e79b1cea42fe8cedd791550050574f42f00acefc0399bd84e6118a0
7
- data.tar.gz: 640a6733f2c82e84bb49fb9f62ccc79b079c944f5377ba105164d717b80384aaa3379548f6b017fce29f77cea36e80dd53ec6a46776a9167061d238af18137a4
6
+ metadata.gz: 0c7d87f03197e14aed4c8c5981c2523a393098247ef4c24cbdb195cf7390712c5232018e4250f6a3e5ce7bb09ab43b245c1073d14976a3f8b73167a39cd31e69
7
+ data.tar.gz: 8d3e5952aa56fdbe787dd2dafe814baea4c538aa9c8e32adbe147780e09a6121a3547efdf4df3a060147b343643840e24af996bb8219b8dd2f011c8e0904ad58
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/spanner)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/spanner/admin/instance/v1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -224,8 +224,19 @@ module Google
224
224
  universe_domain: @config.universe_domain,
225
225
  channel_args: @config.channel_args,
226
226
  interceptors: @config.interceptors,
227
- channel_pool_config: @config.channel_pool
227
+ channel_pool_config: @config.channel_pool,
228
+ logger: @config.logger
228
229
  )
230
+
231
+ @instance_admin_stub.stub_logger&.info do |entry|
232
+ entry.set_system_name
233
+ entry.set_service
234
+ entry.message = "Created client for #{entry.service}"
235
+ entry.set_credentials_fields credentials
236
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
237
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
238
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
239
+ end
229
240
  end
230
241
 
231
242
  ##
@@ -235,11 +246,23 @@ module Google
235
246
  #
236
247
  attr_reader :operations_client
237
248
 
249
+ ##
250
+ # The logger used for request/response debug logging.
251
+ #
252
+ # @return [Logger]
253
+ #
254
+ def logger
255
+ @instance_admin_stub.logger
256
+ end
257
+
238
258
  # Service calls
239
259
 
240
260
  ##
241
261
  # Lists the supported instance configurations for a given project.
242
262
  #
263
+ # Returns both Google-managed configurations and user-managed
264
+ # configurations.
265
+ #
243
266
  # @overload list_instance_configs(request, options = nil)
244
267
  # Pass arguments to `list_instance_configs` via a request object, either of type
245
268
  # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest} or an equivalent Hash.
@@ -332,7 +355,7 @@ module Google
332
355
  @instance_admin_stub.call_rpc :list_instance_configs, request, options: options do |response, operation|
333
356
  response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_configs, request, response, operation, options
334
357
  yield response, operation if block_given?
335
- return response
358
+ throw :response, response
336
359
  end
337
360
  rescue ::GRPC::BadStatus => e
338
361
  raise ::Google::Cloud::Error.from_error(e)
@@ -419,7 +442,6 @@ module Google
419
442
 
420
443
  @instance_admin_stub.call_rpc :get_instance_config, request, options: options do |response, operation|
421
444
  yield response, operation if block_given?
422
- return response
423
445
  end
424
446
  rescue ::GRPC::BadStatus => e
425
447
  raise ::Google::Cloud::Error.from_error(e)
@@ -427,7 +449,7 @@ module Google
427
449
 
428
450
  ##
429
451
  # Creates an instance configuration and begins preparing it to be used. The
430
- # returned {::Google::Longrunning::Operation long-running operation}
452
+ # returned long-running operation
431
453
  # can be used to track the progress of preparing the new
432
454
  # instance configuration. The instance configuration name is assigned by the
433
455
  # caller. If the named instance configuration already exists,
@@ -454,13 +476,13 @@ module Google
454
476
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling}
455
477
  # field becomes false. Its state becomes `READY`.
456
478
  #
457
- # The returned {::Google::Longrunning::Operation long-running operation} will
479
+ # The returned long-running operation will
458
480
  # have a name of the format
459
481
  # `<instance_config_name>/operations/<operation_id>` and can be used to track
460
482
  # creation of the instance configuration. The
461
- # {::Google::Longrunning::Operation#metadata metadata} field type is
483
+ # metadata field type is
462
484
  # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}.
463
- # The {::Google::Longrunning::Operation#response response} field type is
485
+ # The response field type is
464
486
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if
465
487
  # successful.
466
488
  #
@@ -492,10 +514,10 @@ module Google
492
514
  # characters in length. The `custom-` prefix is required to avoid name
493
515
  # conflicts with Google-managed configurations.
494
516
  # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash]
495
- # Required. The InstanceConfig proto of the configuration to create.
496
- # instance_config.name must be
517
+ # Required. The `InstanceConfig` proto of the configuration to create.
518
+ # `instance_config.name` must be
497
519
  # `<parent>/instanceConfigs/<instance_config_id>`.
498
- # instance_config.base_config must be a Google managed configuration name,
520
+ # `instance_config.base_config` must be a Google-managed configuration name,
499
521
  # e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.
500
522
  # @param validate_only [::Boolean]
501
523
  # An option to validate, but not actually execute, a request,
@@ -568,7 +590,7 @@ module Google
568
590
  @instance_admin_stub.call_rpc :create_instance_config, request, options: options do |response, operation|
569
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
570
592
  yield response, operation if block_given?
571
- return response
593
+ throw :response, response
572
594
  end
573
595
  rescue ::GRPC::BadStatus => e
574
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -576,7 +598,7 @@ module Google
576
598
 
577
599
  ##
578
600
  # Updates an instance configuration. The returned
579
- # {::Google::Longrunning::Operation long-running operation} can be used to track
601
+ # long-running operation can be used to track
580
602
  # the progress of updating the instance. If the named instance configuration
581
603
  # does not exist, returns `NOT_FOUND`.
582
604
  #
@@ -607,13 +629,13 @@ module Google
607
629
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling}
608
630
  # field becomes false.
609
631
  #
610
- # The returned {::Google::Longrunning::Operation long-running operation} will
632
+ # The returned long-running operation will
611
633
  # have a name of the format
612
634
  # `<instance_config_name>/operations/<operation_id>` and can be used to track
613
635
  # the instance configuration modification. The
614
- # {::Google::Longrunning::Operation#metadata metadata} field type is
636
+ # metadata field type is
615
637
  # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata UpdateInstanceConfigMetadata}.
616
- # The {::Google::Longrunning::Operation#response response} field type is
638
+ # The response field type is
617
639
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if
618
640
  # successful.
619
641
  #
@@ -721,7 +743,7 @@ module Google
721
743
  @instance_admin_stub.call_rpc :update_instance_config, request, options: options do |response, operation|
722
744
  response = ::Gapic::Operation.new response, @operations_client, options: options
723
745
  yield response, operation if block_given?
724
- return response
746
+ throw :response, response
725
747
  end
726
748
  rescue ::GRPC::BadStatus => e
727
749
  raise ::Google::Cloud::Error.from_error(e)
@@ -827,19 +849,18 @@ module Google
827
849
 
828
850
  @instance_admin_stub.call_rpc :delete_instance_config, request, options: options do |response, operation|
829
851
  yield response, operation if block_given?
830
- return response
831
852
  end
832
853
  rescue ::GRPC::BadStatus => e
833
854
  raise ::Google::Cloud::Error.from_error(e)
834
855
  end
835
856
 
836
857
  ##
837
- # Lists the user-managed instance configuration [long-running
838
- # operations][google.longrunning.Operation] in the given project. An instance
858
+ # Lists the user-managed instance configuration long-running
859
+ # operations in the given project. An instance
839
860
  # configuration operation has a name of the form
840
861
  # `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
841
862
  # The long-running operation
842
- # {::Google::Longrunning::Operation#metadata metadata} field type
863
+ # metadata field type
843
864
  # `metadata.type_url` describes the type of the metadata. Operations returned
844
865
  # include those that have completed/failed/canceled within the last 7 days,
845
866
  # and pending operations. Operations returned are ordered by
@@ -873,8 +894,7 @@ module Google
873
894
  # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
874
895
  # Colon `:` is the contains operator. Filter rules are not case sensitive.
875
896
  #
876
- # The following fields in the {::Google::Longrunning::Operation Operation}
877
- # are eligible for filtering:
897
+ # The following fields in the Operation are eligible for filtering:
878
898
  #
879
899
  # * `name` - The name of the long-running operation
880
900
  # * `done` - False if the operation is in progress, else true.
@@ -983,7 +1003,7 @@ module Google
983
1003
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
984
1004
  response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_config_operations, request, response, operation, options, format_resource: wrap_lro_operation
985
1005
  yield response, operation if block_given?
986
- return response
1006
+ throw :response, response
987
1007
  end
988
1008
  rescue ::GRPC::BadStatus => e
989
1009
  raise ::Google::Cloud::Error.from_error(e)
@@ -1110,7 +1130,7 @@ module Google
1110
1130
  @instance_admin_stub.call_rpc :list_instances, request, options: options do |response, operation|
1111
1131
  response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instances, request, response, operation, options
1112
1132
  yield response, operation if block_given?
1113
- return response
1133
+ throw :response, response
1114
1134
  end
1115
1135
  rescue ::GRPC::BadStatus => e
1116
1136
  raise ::Google::Cloud::Error.from_error(e)
@@ -1136,7 +1156,9 @@ module Google
1136
1156
  #
1137
1157
  # @param parent [::String]
1138
1158
  # Required. The instance whose instance partitions should be listed. Values
1139
- # are of the form `projects/<project>/instances/<instance>`.
1159
+ # are of the form `projects/<project>/instances/<instance>`. Use `{instance}
1160
+ # = '-'` to list instance partitions for all Instances in a project, e.g.,
1161
+ # `projects/myproject/instances/-`.
1140
1162
  # @param page_size [::Integer]
1141
1163
  # Number of instance partitions to be returned in the response. If 0 or less,
1142
1164
  # defaults to the server's maximum allowed page size.
@@ -1217,7 +1239,7 @@ module Google
1217
1239
  @instance_admin_stub.call_rpc :list_instance_partitions, request, options: options do |response, operation|
1218
1240
  response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_partitions, request, response, operation, options
1219
1241
  yield response, operation if block_given?
1220
- return response
1242
+ throw :response, response
1221
1243
  end
1222
1244
  rescue ::GRPC::BadStatus => e
1223
1245
  raise ::Google::Cloud::Error.from_error(e)
@@ -1309,7 +1331,6 @@ module Google
1309
1331
 
1310
1332
  @instance_admin_stub.call_rpc :get_instance, request, options: options do |response, operation|
1311
1333
  yield response, operation if block_given?
1312
- return response
1313
1334
  end
1314
1335
  rescue ::GRPC::BadStatus => e
1315
1336
  raise ::Google::Cloud::Error.from_error(e)
@@ -1317,7 +1338,7 @@ module Google
1317
1338
 
1318
1339
  ##
1319
1340
  # Creates an instance and begins preparing it to begin serving. The
1320
- # returned {::Google::Longrunning::Operation long-running operation}
1341
+ # returned long-running operation
1321
1342
  # can be used to track the progress of preparing the new
1322
1343
  # instance. The instance name is assigned by the caller. If the
1323
1344
  # named instance already exists, `CreateInstance` returns
@@ -1343,12 +1364,12 @@ module Google
1343
1364
  # * The instance's allocated resource levels are readable via the API.
1344
1365
  # * The instance's state becomes `READY`.
1345
1366
  #
1346
- # The returned {::Google::Longrunning::Operation long-running operation} will
1367
+ # The returned long-running operation will
1347
1368
  # have a name of the format `<instance_name>/operations/<operation_id>` and
1348
1369
  # can be used to track creation of the instance. The
1349
- # {::Google::Longrunning::Operation#metadata metadata} field type is
1370
+ # metadata field type is
1350
1371
  # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceMetadata CreateInstanceMetadata}.
1351
- # The {::Google::Longrunning::Operation#response response} field type is
1372
+ # The response field type is
1352
1373
  # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful.
1353
1374
  #
1354
1375
  # @overload create_instance(request, options = nil)
@@ -1444,7 +1465,7 @@ module Google
1444
1465
  @instance_admin_stub.call_rpc :create_instance, request, options: options do |response, operation|
1445
1466
  response = ::Gapic::Operation.new response, @operations_client, options: options
1446
1467
  yield response, operation if block_given?
1447
- return response
1468
+ throw :response, response
1448
1469
  end
1449
1470
  rescue ::GRPC::BadStatus => e
1450
1471
  raise ::Google::Cloud::Error.from_error(e)
@@ -1452,8 +1473,7 @@ module Google
1452
1473
 
1453
1474
  ##
1454
1475
  # Updates an instance, and begins allocating or releasing resources
1455
- # as requested. The returned [long-running
1456
- # operation][google.longrunning.Operation] can be used to track the
1476
+ # as requested. The returned long-running operation can be used to track the
1457
1477
  # progress of updating the instance. If the named instance does not
1458
1478
  # exist, returns `NOT_FOUND`.
1459
1479
  #
@@ -1481,12 +1501,12 @@ module Google
1481
1501
  # tables.
1482
1502
  # * The instance's new resource levels are readable via the API.
1483
1503
  #
1484
- # The returned {::Google::Longrunning::Operation long-running operation} will
1504
+ # The returned long-running operation will
1485
1505
  # have a name of the format `<instance_name>/operations/<operation_id>` and
1486
1506
  # can be used to track the instance modification. The
1487
- # {::Google::Longrunning::Operation#metadata metadata} field type is
1507
+ # metadata field type is
1488
1508
  # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata UpdateInstanceMetadata}.
1489
- # The {::Google::Longrunning::Operation#response response} field type is
1509
+ # The response field type is
1490
1510
  # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful.
1491
1511
  #
1492
1512
  # Authorization requires `spanner.instances.update` permission on
@@ -1586,7 +1606,7 @@ module Google
1586
1606
  @instance_admin_stub.call_rpc :update_instance, request, options: options do |response, operation|
1587
1607
  response = ::Gapic::Operation.new response, @operations_client, options: options
1588
1608
  yield response, operation if block_given?
1589
- return response
1609
+ throw :response, response
1590
1610
  end
1591
1611
  rescue ::GRPC::BadStatus => e
1592
1612
  raise ::Google::Cloud::Error.from_error(e)
@@ -1683,7 +1703,6 @@ module Google
1683
1703
 
1684
1704
  @instance_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation|
1685
1705
  yield response, operation if block_given?
1686
- return response
1687
1706
  end
1688
1707
  rescue ::GRPC::BadStatus => e
1689
1708
  raise ::Google::Cloud::Error.from_error(e)
@@ -1785,7 +1804,6 @@ module Google
1785
1804
 
1786
1805
  @instance_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
1787
1806
  yield response, operation if block_given?
1788
- return response
1789
1807
  end
1790
1808
  rescue ::GRPC::BadStatus => e
1791
1809
  raise ::Google::Cloud::Error.from_error(e)
@@ -1879,7 +1897,6 @@ module Google
1879
1897
 
1880
1898
  @instance_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
1881
1899
  yield response, operation if block_given?
1882
- return response
1883
1900
  end
1884
1901
  rescue ::GRPC::BadStatus => e
1885
1902
  raise ::Google::Cloud::Error.from_error(e)
@@ -1976,7 +1993,6 @@ module Google
1976
1993
 
1977
1994
  @instance_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
1978
1995
  yield response, operation if block_given?
1979
- return response
1980
1996
  end
1981
1997
  rescue ::GRPC::BadStatus => e
1982
1998
  raise ::Google::Cloud::Error.from_error(e)
@@ -2064,7 +2080,6 @@ module Google
2064
2080
 
2065
2081
  @instance_admin_stub.call_rpc :get_instance_partition, request, options: options do |response, operation|
2066
2082
  yield response, operation if block_given?
2067
- return response
2068
2083
  end
2069
2084
  rescue ::GRPC::BadStatus => e
2070
2085
  raise ::Google::Cloud::Error.from_error(e)
@@ -2072,7 +2087,7 @@ module Google
2072
2087
 
2073
2088
  ##
2074
2089
  # Creates an instance partition and begins preparing it to be used. The
2075
- # returned {::Google::Longrunning::Operation long-running operation}
2090
+ # returned long-running operation
2076
2091
  # can be used to track the progress of preparing the new instance partition.
2077
2092
  # The instance partition name is assigned by the caller. If the named
2078
2093
  # instance partition already exists, `CreateInstancePartition` returns
@@ -2099,13 +2114,13 @@ module Google
2099
2114
  # API.
2100
2115
  # * The instance partition's state becomes `READY`.
2101
2116
  #
2102
- # The returned {::Google::Longrunning::Operation long-running operation} will
2117
+ # The returned long-running operation will
2103
2118
  # have a name of the format
2104
2119
  # `<instance_partition_name>/operations/<operation_id>` and can be used to
2105
2120
  # track creation of the instance partition. The
2106
- # {::Google::Longrunning::Operation#metadata metadata} field type is
2121
+ # metadata field type is
2107
2122
  # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}.
2108
- # The {::Google::Longrunning::Operation#response response} field type is
2123
+ # The response field type is
2109
2124
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if
2110
2125
  # successful.
2111
2126
  #
@@ -2204,7 +2219,7 @@ module Google
2204
2219
  @instance_admin_stub.call_rpc :create_instance_partition, request, options: options do |response, operation|
2205
2220
  response = ::Gapic::Operation.new response, @operations_client, options: options
2206
2221
  yield response, operation if block_given?
2207
- return response
2222
+ throw :response, response
2208
2223
  end
2209
2224
  rescue ::GRPC::BadStatus => e
2210
2225
  raise ::Google::Cloud::Error.from_error(e)
@@ -2303,7 +2318,6 @@ module Google
2303
2318
 
2304
2319
  @instance_admin_stub.call_rpc :delete_instance_partition, request, options: options do |response, operation|
2305
2320
  yield response, operation if block_given?
2306
- return response
2307
2321
  end
2308
2322
  rescue ::GRPC::BadStatus => e
2309
2323
  raise ::Google::Cloud::Error.from_error(e)
@@ -2311,8 +2325,7 @@ module Google
2311
2325
 
2312
2326
  ##
2313
2327
  # Updates an instance partition, and begins allocating or releasing resources
2314
- # as requested. The returned [long-running
2315
- # operation][google.longrunning.Operation] can be used to track the
2328
+ # as requested. The returned long-running operation can be used to track the
2316
2329
  # progress of updating the instance partition. If the named instance
2317
2330
  # partition does not exist, returns `NOT_FOUND`.
2318
2331
  #
@@ -2341,13 +2354,13 @@ module Google
2341
2354
  # partition's tables.
2342
2355
  # * The instance partition's new resource levels are readable via the API.
2343
2356
  #
2344
- # The returned {::Google::Longrunning::Operation long-running operation} will
2357
+ # The returned long-running operation will
2345
2358
  # have a name of the format
2346
2359
  # `<instance_partition_name>/operations/<operation_id>` and can be used to
2347
2360
  # track the instance partition modification. The
2348
- # {::Google::Longrunning::Operation#metadata metadata} field type is
2361
+ # metadata field type is
2349
2362
  # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata UpdateInstancePartitionMetadata}.
2350
- # The {::Google::Longrunning::Operation#response response} field type is
2363
+ # The response field type is
2351
2364
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if
2352
2365
  # successful.
2353
2366
  #
@@ -2450,19 +2463,18 @@ module Google
2450
2463
  @instance_admin_stub.call_rpc :update_instance_partition, request, options: options do |response, operation|
2451
2464
  response = ::Gapic::Operation.new response, @operations_client, options: options
2452
2465
  yield response, operation if block_given?
2453
- return response
2466
+ throw :response, response
2454
2467
  end
2455
2468
  rescue ::GRPC::BadStatus => e
2456
2469
  raise ::Google::Cloud::Error.from_error(e)
2457
2470
  end
2458
2471
 
2459
2472
  ##
2460
- # Lists instance partition [long-running
2461
- # operations][google.longrunning.Operation] in the given instance.
2473
+ # Lists instance partition long-running operations in the given instance.
2462
2474
  # An instance partition operation has a name of the form
2463
2475
  # `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
2464
2476
  # The long-running operation
2465
- # {::Google::Longrunning::Operation#metadata metadata} field type
2477
+ # metadata field type
2466
2478
  # `metadata.type_url` describes the type of the metadata. Operations returned
2467
2479
  # include those that have completed/failed/canceled within the last 7 days,
2468
2480
  # and pending operations. Operations returned are ordered by
@@ -2500,8 +2512,7 @@ module Google
2500
2512
  # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
2501
2513
  # Colon `:` is the contains operator. Filter rules are not case sensitive.
2502
2514
  #
2503
- # The following fields in the {::Google::Longrunning::Operation Operation}
2504
- # are eligible for filtering:
2515
+ # The following fields in the Operation are eligible for filtering:
2505
2516
  #
2506
2517
  # * `name` - The name of the long-running operation
2507
2518
  # * `done` - False if the operation is in progress, else true.
@@ -2548,7 +2559,8 @@ module Google
2548
2559
  # Optional. Deadline used while retrieving metadata for instance partition
2549
2560
  # operations. Instance partitions whose operation metadata cannot be
2550
2561
  # retrieved within this deadline will be added to
2551
- # [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
2562
+ # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#unreachable_instance_partitions unreachable_instance_partitions}
2563
+ # in
2552
2564
  # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse}.
2553
2565
  #
2554
2566
  # @yield [response, operation] Access the result along with the RPC operation
@@ -2616,7 +2628,7 @@ module Google
2616
2628
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
2617
2629
  response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_partition_operations, request, response, operation, options, format_resource: wrap_lro_operation
2618
2630
  yield response, operation if block_given?
2619
- return response
2631
+ throw :response, response
2620
2632
  end
2621
2633
  rescue ::GRPC::BadStatus => e
2622
2634
  raise ::Google::Cloud::Error.from_error(e)
@@ -2624,7 +2636,7 @@ module Google
2624
2636
 
2625
2637
  ##
2626
2638
  # Moves an instance to the target instance configuration. You can use the
2627
- # returned {::Google::Longrunning::Operation long-running operation} to track
2639
+ # returned long-running operation to track
2628
2640
  # the progress of moving the instance.
2629
2641
  #
2630
2642
  # `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of
@@ -2655,13 +2667,13 @@ module Google
2655
2667
  # transaction abort rate. However, moving an instance doesn't cause any
2656
2668
  # downtime.
2657
2669
  #
2658
- # The returned {::Google::Longrunning::Operation long-running operation} has
2670
+ # The returned long-running operation has
2659
2671
  # a name of the format
2660
2672
  # `<instance_name>/operations/<operation_id>` and can be used to track
2661
2673
  # the move instance operation. The
2662
- # {::Google::Longrunning::Operation#metadata metadata} field type is
2674
+ # metadata field type is
2663
2675
  # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata MoveInstanceMetadata}.
2664
- # The {::Google::Longrunning::Operation#response response} field type is
2676
+ # The response field type is
2665
2677
  # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance},
2666
2678
  # if successful.
2667
2679
  # Cancelling the operation sets its metadata's
@@ -2774,7 +2786,7 @@ module Google
2774
2786
  @instance_admin_stub.call_rpc :move_instance, request, options: options do |response, operation|
2775
2787
  response = ::Gapic::Operation.new response, @operations_client, options: options
2776
2788
  yield response, operation if block_given?
2777
- return response
2789
+ throw :response, response
2778
2790
  end
2779
2791
  rescue ::GRPC::BadStatus => e
2780
2792
  raise ::Google::Cloud::Error.from_error(e)
@@ -2863,6 +2875,11 @@ module Google
2863
2875
  # default endpoint URL. The default value of nil uses the environment
2864
2876
  # universe (usually the default "googleapis.com" universe).
2865
2877
  # @return [::String,nil]
2878
+ # @!attribute [rw] logger
2879
+ # A custom logger to use for request/response debug logging, or the value
2880
+ # `:default` (the default) to construct a default logger, or `nil` to
2881
+ # explicitly disable logging.
2882
+ # @return [::Logger,:default,nil]
2866
2883
  #
2867
2884
  class Configuration
2868
2885
  extend ::Gapic::Config
@@ -2887,6 +2904,7 @@ module Google
2887
2904
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2888
2905
  config_attr :quota_project, nil, ::String, nil
2889
2906
  config_attr :universe_domain, nil, ::String, nil
2907
+ config_attr :logger, :default, ::Logger, nil, :default
2890
2908
 
2891
2909
  # @private
2892
2910
  def initialize parent_config = nil