google-cloud-spanner-admin-database-v1 0.18.0 → 0.19.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: f4797e7291e8bc66afa9acb68fad3b09bfd63b3f573a37999e54a62d6e43804f
4
- data.tar.gz: 6368068d26252f0d9dfd7bfe49af6b31005aa9cd31a4559425341933874a2b70
3
+ metadata.gz: 26e6328ccbda8c25a324e917beb396f114f56275b4ea0f1a4d91460d433d3009
4
+ data.tar.gz: 5f1013273737b9236680aeeda0c030a1e5228c6202ba97f2202a972ac7cafcbf
5
5
  SHA512:
6
- metadata.gz: 86e1748d22b39114a16d3b3dcf28ee61c85b3c5900ff831651b27013e9fd22e42706e6d47d9eab4c92f8220ac4c5c80d6a2ee351fa7bb5af399dfaac6596ede1
7
- data.tar.gz: bad826c972d169bf4ef39216fac4b69e19eb1528447e0fc365411cd849b23c4f761a5a3066d7cbceeda7a434734e8a1b485325a1f2797513717b2e779de0507d
6
+ metadata.gz: 3b9f02e358aa651a9aad609f579610dbd5724adb2a957a0c618b3812f5b8c4fe6acb90a81ebf779a9a7f70ac0f6cf81563b5cf45139f7ebc076f7532b656c50e
7
+ data.tar.gz: '082eb0b0d75468b171cb594ccb0f50b8f45edf6bd559fa44c3c9eca4b2fd8e292062a7f73f6d1f3c50d64cfbd99597a956eebddcfb0c41b16ee1a641d2a9a219'
@@ -34,10 +34,13 @@ module Google
34
34
  # The Cloud Spanner Database Admin API can be used to:
35
35
  # * create, drop, and list databases
36
36
  # * update the schema of pre-existing databases
37
- # * create, delete and list backups for a database
37
+ # * create, delete, copy and list backups for a database
38
38
  # * restore a database from an existing backup
39
39
  #
40
40
  class Client
41
+ # @private
42
+ API_VERSION = ""
43
+
41
44
  # @private
42
45
  DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$"
43
46
 
@@ -290,8 +293,9 @@ module Google
290
293
  # defaults to the server's maximum allowed page size.
291
294
  # @param page_token [::String]
292
295
  # If non-empty, `page_token` should contain a
293
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} from a
294
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
296
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token}
297
+ # from a previous
298
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
295
299
  #
296
300
  # @yield [response, operation] Access the result along with the RPC operation
297
301
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>]
@@ -331,10 +335,11 @@ module Google
331
335
  # Customize the options with defaults
332
336
  metadata = @config.rpcs.list_databases.metadata.to_h
333
337
 
334
- # Set x-goog-api-client and x-goog-user-project headers
338
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
335
339
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
336
340
  lib_name: @config.lib_name, lib_version: @config.lib_version,
337
341
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
342
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
338
343
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
339
344
 
340
345
  header_params = {}
@@ -368,8 +373,8 @@ module Google
368
373
  # have a name of the format `<database_name>/operations/<operation_id>` and
369
374
  # can be used to track preparation of the database. The
370
375
  # {::Google::Longrunning::Operation#metadata metadata} field type is
371
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}. The
372
- # {::Google::Longrunning::Operation#response response} field type is
376
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}.
377
+ # The {::Google::Longrunning::Operation#response response} field type is
373
378
  # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful.
374
379
  #
375
380
  # @overload create_database(request, options = nil)
@@ -402,8 +407,8 @@ module Google
402
407
  # statements execute atomically with the creation of the database:
403
408
  # if there is an error in any statement, the database is not created.
404
409
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig, ::Hash]
405
- # Optional. The encryption configuration for the database. If this field is not
406
- # specified, Cloud Spanner will encrypt/decrypt all data at rest using
410
+ # Optional. The encryption configuration for the database. If this field is
411
+ # not specified, Cloud Spanner will encrypt/decrypt all data at rest using
407
412
  # Google default encryption.
408
413
  # @param database_dialect [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect]
409
414
  # Optional. The dialect of the Cloud Spanner Database.
@@ -465,10 +470,11 @@ module Google
465
470
  # Customize the options with defaults
466
471
  metadata = @config.rpcs.create_database.metadata.to_h
467
472
 
468
- # Set x-goog-api-client and x-goog-user-project headers
473
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
469
474
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
470
475
  lib_name: @config.lib_name, lib_version: @config.lib_version,
471
476
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
477
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
472
478
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
473
479
 
474
480
  header_params = {}
@@ -552,10 +558,11 @@ module Google
552
558
  # Customize the options with defaults
553
559
  metadata = @config.rpcs.get_database.metadata.to_h
554
560
 
555
- # Set x-goog-api-client and x-goog-user-project headers
561
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
556
562
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
557
563
  lib_name: @config.lib_name, lib_version: @config.lib_version,
558
564
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
565
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
559
566
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
560
567
 
561
568
  header_params = {}
@@ -684,10 +691,11 @@ module Google
684
691
  # Customize the options with defaults
685
692
  metadata = @config.rpcs.update_database.metadata.to_h
686
693
 
687
- # Set x-goog-api-client and x-goog-user-project headers
694
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
688
695
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
689
696
  lib_name: @config.lib_name, lib_version: @config.lib_version,
690
697
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
698
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
691
699
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
692
700
 
693
701
  header_params = {}
@@ -722,7 +730,8 @@ module Google
722
730
  # the format `<database_name>/operations/<operation_id>` and can be used to
723
731
  # track execution of the schema change(s). The
724
732
  # {::Google::Longrunning::Operation#metadata metadata} field type is
725
- # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}. The operation has no response.
733
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}.
734
+ # The operation has no response.
726
735
  #
727
736
  # @overload update_database_ddl(request, options = nil)
728
737
  # Pass arguments to `update_database_ddl` via a request object, either of type
@@ -751,18 +760,20 @@ module Google
751
760
  #
752
761
  # Specifying an explicit operation ID simplifies determining
753
762
  # whether the statements were executed in the event that the
754
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} call is replayed,
755
- # or the return value is otherwise lost: the {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} and
756
- # `operation_id` fields can be combined to form the
763
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
764
+ # call is replayed, or the return value is otherwise lost: the
765
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database}
766
+ # and `operation_id` fields can be combined to form the
757
767
  # {::Google::Longrunning::Operation#name name} of the resulting
758
- # {::Google::Longrunning::Operation longrunning.Operation}: `<database>/operations/<operation_id>`.
768
+ # {::Google::Longrunning::Operation longrunning.Operation}:
769
+ # `<database>/operations/<operation_id>`.
759
770
  #
760
771
  # `operation_id` should be unique within the database, and must be
761
772
  # a valid identifier: `[a-z][a-z0-9_]*`. Note that
762
773
  # automatically-generated operation IDs always begin with an
763
774
  # underscore. If the named operation already exists,
764
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} returns
765
- # `ALREADY_EXISTS`.
775
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
776
+ # returns `ALREADY_EXISTS`.
766
777
  # @param proto_descriptors [::String]
767
778
  # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements.
768
779
  # Contains a protobuf-serialized
@@ -820,10 +831,11 @@ module Google
820
831
  # Customize the options with defaults
821
832
  metadata = @config.rpcs.update_database_ddl.metadata.to_h
822
833
 
823
- # Set x-goog-api-client and x-goog-user-project headers
834
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
824
835
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
825
836
  lib_name: @config.lib_name, lib_version: @config.lib_version,
826
837
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
838
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
827
839
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
828
840
 
829
841
  header_params = {}
@@ -910,10 +922,11 @@ module Google
910
922
  # Customize the options with defaults
911
923
  metadata = @config.rpcs.drop_database.metadata.to_h
912
924
 
913
- # Set x-goog-api-client and x-goog-user-project headers
925
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
914
926
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
915
927
  lib_name: @config.lib_name, lib_version: @config.lib_version,
916
928
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
929
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
917
930
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
918
931
 
919
932
  header_params = {}
@@ -999,10 +1012,11 @@ module Google
999
1012
  # Customize the options with defaults
1000
1013
  metadata = @config.rpcs.get_database_ddl.metadata.to_h
1001
1014
 
1002
- # Set x-goog-api-client and x-goog-user-project headers
1015
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1003
1016
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1004
1017
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1005
1018
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1019
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1006
1020
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1007
1021
 
1008
1022
  header_params = {}
@@ -1102,10 +1116,11 @@ module Google
1102
1116
  # Customize the options with defaults
1103
1117
  metadata = @config.rpcs.set_iam_policy.metadata.to_h
1104
1118
 
1105
- # Set x-goog-api-client and x-goog-user-project headers
1119
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1106
1120
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1107
1121
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1108
1122
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1123
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1109
1124
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1110
1125
 
1111
1126
  header_params = {}
@@ -1198,10 +1213,11 @@ module Google
1198
1213
  # Customize the options with defaults
1199
1214
  metadata = @config.rpcs.get_iam_policy.metadata.to_h
1200
1215
 
1201
- # Set x-goog-api-client and x-goog-user-project headers
1216
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1202
1217
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1203
1218
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1204
1219
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1220
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1205
1221
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1206
1222
 
1207
1223
  header_params = {}
@@ -1298,10 +1314,11 @@ module Google
1298
1314
  # Customize the options with defaults
1299
1315
  metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1300
1316
 
1301
- # Set x-goog-api-client and x-goog-user-project headers
1317
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1302
1318
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1303
1319
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1304
1320
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1321
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1305
1322
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1306
1323
 
1307
1324
  header_params = {}
@@ -1335,12 +1352,12 @@ module Google
1335
1352
  # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
1336
1353
  # and can be used to track creation of the backup. The
1337
1354
  # {::Google::Longrunning::Operation#metadata metadata} field type is
1338
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. The
1339
- # {::Google::Longrunning::Operation#response response} field type is
1340
- # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. Cancelling the returned operation will stop the
1341
- # creation and delete the backup.
1342
- # There can be only one pending backup creation per database. Backup creation
1343
- # of different databases can run concurrently.
1355
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
1356
+ # The {::Google::Longrunning::Operation#response response} field type is
1357
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful.
1358
+ # Cancelling the returned operation will stop the creation and delete the
1359
+ # backup. There can be only one pending backup creation per database. Backup
1360
+ # creation of different databases can run concurrently.
1344
1361
  #
1345
1362
  # @overload create_backup(request, options = nil)
1346
1363
  # Pass arguments to `create_backup` via a request object, either of type
@@ -1371,11 +1388,11 @@ module Google
1371
1388
  # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash]
1372
1389
  # Required. The backup to create.
1373
1390
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig, ::Hash]
1374
- # Optional. The encryption configuration used to encrypt the backup. If this field is
1375
- # not specified, the backup will use the same
1376
- # encryption configuration as the database by default, namely
1377
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} =
1378
- # `USE_DATABASE_ENCRYPTION`.
1391
+ # Optional. The encryption configuration used to encrypt the backup. If this
1392
+ # field is not specified, the backup will use the same encryption
1393
+ # configuration as the database by default, namely
1394
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
1395
+ # = `USE_DATABASE_ENCRYPTION`.
1379
1396
  #
1380
1397
  # @yield [response, operation] Access the result along with the RPC operation
1381
1398
  # @yieldparam response [::Gapic::Operation]
@@ -1418,10 +1435,11 @@ module Google
1418
1435
  # Customize the options with defaults
1419
1436
  metadata = @config.rpcs.create_backup.metadata.to_h
1420
1437
 
1421
- # Set x-goog-api-client and x-goog-user-project headers
1438
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1422
1439
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1423
1440
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1424
1441
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1442
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1425
1443
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1426
1444
 
1427
1445
  header_params = {}
@@ -1459,9 +1477,10 @@ module Google
1459
1477
  # The {::Google::Longrunning::Operation#metadata metadata} field type is
1460
1478
  # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
1461
1479
  # The {::Google::Longrunning::Operation#response response} field type is
1462
- # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. Cancelling the returned operation will stop the
1463
- # copying and delete the backup.
1464
- # Concurrent CopyBackup requests can run on the same source backup.
1480
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful.
1481
+ # Cancelling the returned operation will stop the copying and delete the
1482
+ # destination backup. Concurrent CopyBackup requests can run on the same
1483
+ # source backup.
1465
1484
  #
1466
1485
  # @overload copy_backup(request, options = nil)
1467
1486
  # Pass arguments to `copy_backup` via a request object, either of type
@@ -1479,8 +1498,8 @@ module Google
1479
1498
  # the default parameter values, pass an empty Hash as a request object (see above).
1480
1499
  #
1481
1500
  # @param parent [::String]
1482
- # Required. The name of the destination instance that will contain the backup copy.
1483
- # Values are of the form: `projects/<project>/instances/<instance>`.
1501
+ # Required. The name of the destination instance that will contain the backup
1502
+ # copy. Values are of the form: `projects/<project>/instances/<instance>`.
1484
1503
  # @param backup_id [::String]
1485
1504
  # Required. The id of the backup copy.
1486
1505
  # The `backup_id` appended to `parent` forms the full backup_uri of the form
@@ -1499,11 +1518,11 @@ module Google
1499
1518
  # passed, the backup is eligible to be automatically deleted by Cloud Spanner
1500
1519
  # to free the resources used by the backup.
1501
1520
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig, ::Hash]
1502
- # Optional. The encryption configuration used to encrypt the backup. If this field is
1503
- # not specified, the backup will use the same
1504
- # encryption configuration as the source backup by default, namely
1505
- # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} =
1506
- # `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
1521
+ # Optional. The encryption configuration used to encrypt the backup. If this
1522
+ # field is not specified, the backup will use the same encryption
1523
+ # configuration as the source backup by default, namely
1524
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type}
1525
+ # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
1507
1526
  #
1508
1527
  # @yield [response, operation] Access the result along with the RPC operation
1509
1528
  # @yieldparam response [::Gapic::Operation]
@@ -1546,10 +1565,11 @@ module Google
1546
1565
  # Customize the options with defaults
1547
1566
  metadata = @config.rpcs.copy_backup.metadata.to_h
1548
1567
 
1549
- # Set x-goog-api-client and x-goog-user-project headers
1568
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1550
1569
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1551
1570
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1552
1571
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1572
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1553
1573
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1554
1574
 
1555
1575
  header_params = {}
@@ -1578,7 +1598,8 @@ module Google
1578
1598
  end
1579
1599
 
1580
1600
  ##
1581
- # Gets metadata on a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1601
+ # Gets metadata on a pending or completed
1602
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1582
1603
  #
1583
1604
  # @overload get_backup(request, options = nil)
1584
1605
  # Pass arguments to `get_backup` via a request object, either of type
@@ -1634,10 +1655,11 @@ module Google
1634
1655
  # Customize the options with defaults
1635
1656
  metadata = @config.rpcs.get_backup.metadata.to_h
1636
1657
 
1637
- # Set x-goog-api-client and x-goog-user-project headers
1658
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1638
1659
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1639
1660
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1640
1661
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1662
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1641
1663
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1642
1664
 
1643
1665
  header_params = {}
@@ -1665,7 +1687,8 @@ module Google
1665
1687
  end
1666
1688
 
1667
1689
  ##
1668
- # Updates a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1690
+ # Updates a pending or completed
1691
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1669
1692
  #
1670
1693
  # @overload update_backup(request, options = nil)
1671
1694
  # Pass arguments to `update_backup` via a request object, either of type
@@ -1728,10 +1751,11 @@ module Google
1728
1751
  # Customize the options with defaults
1729
1752
  metadata = @config.rpcs.update_backup.metadata.to_h
1730
1753
 
1731
- # Set x-goog-api-client and x-goog-user-project headers
1754
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1732
1755
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1733
1756
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1734
1757
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1758
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1735
1759
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1736
1760
 
1737
1761
  header_params = {}
@@ -1759,7 +1783,8 @@ module Google
1759
1783
  end
1760
1784
 
1761
1785
  ##
1762
- # Deletes a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1786
+ # Deletes a pending or completed
1787
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
1763
1788
  #
1764
1789
  # @overload delete_backup(request, options = nil)
1765
1790
  # Pass arguments to `delete_backup` via a request object, either of type
@@ -1815,10 +1840,11 @@ module Google
1815
1840
  # Customize the options with defaults
1816
1841
  metadata = @config.rpcs.delete_backup.metadata.to_h
1817
1842
 
1818
- # Set x-goog-api-client and x-goog-user-project headers
1843
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1819
1844
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1820
1845
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1821
1846
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1847
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1822
1848
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1823
1849
 
1824
1850
  header_params = {}
@@ -1877,7 +1903,9 @@ module Google
1877
1903
  # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
1878
1904
  # Colon `:` is the contains operator. Filter rules are not case sensitive.
1879
1905
  #
1880
- # The following fields in the {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for filtering:
1906
+ # The following fields in the
1907
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for
1908
+ # filtering:
1881
1909
  #
1882
1910
  # * `name`
1883
1911
  # * `database`
@@ -1909,9 +1937,10 @@ module Google
1909
1937
  # less, defaults to the server's maximum allowed page size.
1910
1938
  # @param page_token [::String]
1911
1939
  # If non-empty, `page_token` should contain a
1912
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} from a
1913
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} to the same `parent` and with the same
1914
- # `filter`.
1940
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
1941
+ # from a previous
1942
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse}
1943
+ # to the same `parent` and with the same `filter`.
1915
1944
  #
1916
1945
  # @yield [response, operation] Access the result along with the RPC operation
1917
1946
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
@@ -1951,10 +1980,11 @@ module Google
1951
1980
  # Customize the options with defaults
1952
1981
  metadata = @config.rpcs.list_backups.metadata.to_h
1953
1982
 
1954
- # Set x-goog-api-client and x-goog-user-project headers
1983
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1955
1984
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1956
1985
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1957
1986
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
1987
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1958
1988
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1959
1989
 
1960
1990
  header_params = {}
@@ -2031,12 +2061,12 @@ module Google
2031
2061
  # Name of the backup from which to restore. Values are of the form
2032
2062
  # `projects/<project>/instances/<instance>/backups/<backup>`.
2033
2063
  # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig, ::Hash]
2034
- # Optional. An encryption configuration describing the encryption type and key
2035
- # resources in Cloud KMS used to encrypt/decrypt the database to restore to.
2036
- # If this field is not specified, the restored database will use
2037
- # the same encryption configuration as the backup by default, namely
2038
- # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} =
2039
- # `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
2064
+ # Optional. An encryption configuration describing the encryption type and
2065
+ # key resources in Cloud KMS used to encrypt/decrypt the database to restore
2066
+ # to. If this field is not specified, the restored database will use the same
2067
+ # encryption configuration as the backup by default, namely
2068
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
2069
+ # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
2040
2070
  #
2041
2071
  # @yield [response, operation] Access the result along with the RPC operation
2042
2072
  # @yieldparam response [::Gapic::Operation]
@@ -2079,10 +2109,11 @@ module Google
2079
2109
  # Customize the options with defaults
2080
2110
  metadata = @config.rpcs.restore_database.metadata.to_h
2081
2111
 
2082
- # Set x-goog-api-client and x-goog-user-project headers
2112
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2083
2113
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2084
2114
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2085
2115
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2116
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2086
2117
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2087
2118
 
2088
2119
  header_params = {}
@@ -2153,7 +2184,9 @@ module Google
2153
2184
  # * `name` - The name of the long-running operation
2154
2185
  # * `done` - False if the operation is in progress, else true.
2155
2186
  # * `metadata.@type` - the type of metadata. For example, the type string
2156
- # for {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} is
2187
+ # for
2188
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}
2189
+ # is
2157
2190
  # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
2158
2191
  # * `metadata.<field_name>` - any field in metadata.value.
2159
2192
  # `metadata.@type` must be specified first, if filtering on metadata
@@ -2175,7 +2208,8 @@ module Google
2175
2208
  # `(metadata.name:restored_howl) AND` \
2176
2209
  # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
2177
2210
  # `(error:*)` - Return operations where:
2178
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
2211
+ # * The operation's metadata type is
2212
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
2179
2213
  # * The database is restored from a backup.
2180
2214
  # * The backup name contains "backup_howl".
2181
2215
  # * The restored database's name contains "restored_howl".
@@ -2187,8 +2221,9 @@ module Google
2187
2221
  # @param page_token [::String]
2188
2222
  # If non-empty, `page_token` should contain a
2189
2223
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token}
2190
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} to the
2191
- # same `parent` and with the same `filter`.
2224
+ # from a previous
2225
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse}
2226
+ # to the same `parent` and with the same `filter`.
2192
2227
  #
2193
2228
  # @yield [response, operation] Access the result along with the RPC operation
2194
2229
  # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
@@ -2228,10 +2263,11 @@ module Google
2228
2263
  # Customize the options with defaults
2229
2264
  metadata = @config.rpcs.list_database_operations.metadata.to_h
2230
2265
 
2231
- # Set x-goog-api-client and x-goog-user-project headers
2266
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2232
2267
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2233
2268
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2234
2269
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2270
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2235
2271
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2236
2272
 
2237
2273
  header_params = {}
@@ -2305,7 +2341,9 @@ module Google
2305
2341
  # * `name` - The name of the long-running operation
2306
2342
  # * `done` - False if the operation is in progress, else true.
2307
2343
  # * `metadata.@type` - the type of metadata. For example, the type string
2308
- # for {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} is
2344
+ # for
2345
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
2346
+ # is
2309
2347
  # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
2310
2348
  # * `metadata.<field_name>` - any field in metadata.value.
2311
2349
  # `metadata.@type` must be specified first if filtering on metadata
@@ -2323,14 +2361,15 @@ module Google
2323
2361
  # * `done:true` - The operation is complete.
2324
2362
  # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
2325
2363
  # `metadata.database:prod` - Returns operations where:
2326
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2327
- # * The database the backup was taken from has a name containing the
2328
- # string "prod".
2364
+ # * The operation's metadata type is
2365
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2366
+ # * The source database name of backup contains the string "prod".
2329
2367
  # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
2330
2368
  # `(metadata.name:howl) AND` \
2331
2369
  # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
2332
2370
  # `(error:*)` - Returns operations where:
2333
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2371
+ # * The operation's metadata type is
2372
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
2334
2373
  # * The backup name contains the string "howl".
2335
2374
  # * The operation started before 2018-03-28T14:50:00Z.
2336
2375
  # * The operation resulted in an error.
@@ -2338,9 +2377,9 @@ module Google
2338
2377
  # `(metadata.source_backup:test) AND` \
2339
2378
  # `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \
2340
2379
  # `(error:*)` - Returns operations where:
2341
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
2342
- # * The source backup of the copied backup name contains the string
2343
- # "test".
2380
+ # * The operation's metadata type is
2381
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
2382
+ # * The source backup name contains the string "test".
2344
2383
  # * The operation started before 2022-01-18T14:50:00Z.
2345
2384
  # * The operation resulted in an error.
2346
2385
  # * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
@@ -2350,12 +2389,13 @@ module Google
2350
2389
  # `(metadata.source_backup:test_bkp)) AND` \
2351
2390
  # `(error:*)` - Returns operations where:
2352
2391
  # * The operation's metadata matches either of criteria:
2353
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} AND the
2354
- # database the backup was taken from has name containing string
2392
+ # * The operation's metadata type is
2393
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
2394
+ # AND the source database name of the backup contains the string
2355
2395
  # "test_db"
2356
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata} AND the
2357
- # backup the backup was copied from has name containing string
2358
- # "test_bkp"
2396
+ # * The operation's metadata type is
2397
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}
2398
+ # AND the source backup name contains the string "test_bkp"
2359
2399
  # * The operation resulted in an error.
2360
2400
  # @param page_size [::Integer]
2361
2401
  # Number of operations to be returned in the response. If 0 or
@@ -2363,8 +2403,9 @@ module Google
2363
2403
  # @param page_token [::String]
2364
2404
  # If non-empty, `page_token` should contain a
2365
2405
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
2366
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} to the
2367
- # same `parent` and with the same `filter`.
2406
+ # from a previous
2407
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse}
2408
+ # to the same `parent` and with the same `filter`.
2368
2409
  #
2369
2410
  # @yield [response, operation] Access the result along with the RPC operation
2370
2411
  # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
@@ -2404,10 +2445,11 @@ module Google
2404
2445
  # Customize the options with defaults
2405
2446
  metadata = @config.rpcs.list_backup_operations.metadata.to_h
2406
2447
 
2407
- # Set x-goog-api-client and x-goog-user-project headers
2448
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2408
2449
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2409
2450
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2410
2451
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2452
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2411
2453
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2412
2454
 
2413
2455
  header_params = {}
@@ -2457,14 +2499,15 @@ module Google
2457
2499
  # @param parent [::String]
2458
2500
  # Required. The database whose roles should be listed.
2459
2501
  # Values are of the form
2460
- # `projects/<project>/instances/<instance>/databases/<database>/databaseRoles`.
2502
+ # `projects/<project>/instances/<instance>/databases/<database>`.
2461
2503
  # @param page_size [::Integer]
2462
2504
  # Number of database roles to be returned in the response. If 0 or less,
2463
2505
  # defaults to the server's maximum allowed page size.
2464
2506
  # @param page_token [::String]
2465
2507
  # If non-empty, `page_token` should contain a
2466
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token} from a
2467
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}.
2508
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token}
2509
+ # from a previous
2510
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}.
2468
2511
  #
2469
2512
  # @yield [response, operation] Access the result along with the RPC operation
2470
2513
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>]
@@ -2504,10 +2547,11 @@ module Google
2504
2547
  # Customize the options with defaults
2505
2548
  metadata = @config.rpcs.list_database_roles.metadata.to_h
2506
2549
 
2507
- # Set x-goog-api-client and x-goog-user-project headers
2550
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2508
2551
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2509
2552
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2510
2553
  gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION
2554
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2511
2555
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2512
2556
 
2513
2557
  header_params = {}