google-cloud-spanner-admin-database-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-spanner-admin-database-v1.rb +21 -0
- data/lib/google/cloud/spanner/admin/database/v1.rb +39 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin.rb +59 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +1989 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb +56 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +574 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb +92 -0
- data/lib/google/cloud/spanner/admin/database/v1/version.rb +32 -0
- data/lib/google/spanner/admin/database/v1/backup_pb.rb +101 -0
- data/lib/google/spanner/admin/database/v1/common_pb.rb +31 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +144 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +170 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +248 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/spanner/admin/database/v1/backup.rb +364 -0
- data/proto_docs/google/spanner/admin/database/v1/common.rb +48 -0
- data/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +437 -0
- data/proto_docs/google/type/expr.rb +52 -0
- metadata +235 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Spanner
|
23
|
+
module Admin
|
24
|
+
module Database
|
25
|
+
module V1
|
26
|
+
module DatabaseAdmin
|
27
|
+
# Path helper methods for the DatabaseAdmin API.
|
28
|
+
module Paths
|
29
|
+
##
|
30
|
+
# Create a fully-qualified Backup resource string.
|
31
|
+
#
|
32
|
+
# The resource will be in the following format:
|
33
|
+
#
|
34
|
+
# `projects/{project}/instances/{instance}/backups/{backup}`
|
35
|
+
#
|
36
|
+
# @param project [String]
|
37
|
+
# @param instance [String]
|
38
|
+
# @param backup [String]
|
39
|
+
#
|
40
|
+
# @return [::String]
|
41
|
+
def backup_path project:, instance:, backup:
|
42
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
43
|
+
raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
|
44
|
+
|
45
|
+
"projects/#{project}/instances/#{instance}/backups/#{backup}"
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
# Create a fully-qualified Database resource string.
|
50
|
+
#
|
51
|
+
# The resource will be in the following format:
|
52
|
+
#
|
53
|
+
# `projects/{project}/instances/{instance}/databases/{database}`
|
54
|
+
#
|
55
|
+
# @param project [String]
|
56
|
+
# @param instance [String]
|
57
|
+
# @param database [String]
|
58
|
+
#
|
59
|
+
# @return [::String]
|
60
|
+
def database_path project:, instance:, database:
|
61
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
62
|
+
raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
|
63
|
+
|
64
|
+
"projects/#{project}/instances/#{instance}/databases/#{database}"
|
65
|
+
end
|
66
|
+
|
67
|
+
##
|
68
|
+
# Create a fully-qualified Instance resource string.
|
69
|
+
#
|
70
|
+
# The resource will be in the following format:
|
71
|
+
#
|
72
|
+
# `projects/{project}/instances/{instance}`
|
73
|
+
#
|
74
|
+
# @param project [String]
|
75
|
+
# @param instance [String]
|
76
|
+
#
|
77
|
+
# @return [::String]
|
78
|
+
def instance_path project:, instance:
|
79
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
80
|
+
|
81
|
+
"projects/#{project}/instances/#{instance}"
|
82
|
+
end
|
83
|
+
|
84
|
+
extend self
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Spanner
|
23
|
+
module Admin
|
24
|
+
module Database
|
25
|
+
module V1
|
26
|
+
VERSION = "0.1.0"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/spanner/admin/database/v1/backup.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/api/resource_pb'
|
8
|
+
require 'google/longrunning/operations_pb'
|
9
|
+
require 'google/protobuf/field_mask_pb'
|
10
|
+
require 'google/protobuf/timestamp_pb'
|
11
|
+
require 'google/spanner/admin/database/v1/common_pb'
|
12
|
+
require 'google/api/annotations_pb'
|
13
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
|
+
add_file("google/spanner/admin/database/v1/backup.proto", :syntax => :proto3) do
|
15
|
+
add_message "google.spanner.admin.database.v1.Backup" do
|
16
|
+
optional :database, :string, 2
|
17
|
+
optional :expire_time, :message, 3, "google.protobuf.Timestamp"
|
18
|
+
optional :name, :string, 1
|
19
|
+
optional :create_time, :message, 4, "google.protobuf.Timestamp"
|
20
|
+
optional :size_bytes, :int64, 5
|
21
|
+
optional :state, :enum, 6, "google.spanner.admin.database.v1.Backup.State"
|
22
|
+
repeated :referencing_databases, :string, 7
|
23
|
+
end
|
24
|
+
add_enum "google.spanner.admin.database.v1.Backup.State" do
|
25
|
+
value :STATE_UNSPECIFIED, 0
|
26
|
+
value :CREATING, 1
|
27
|
+
value :READY, 2
|
28
|
+
end
|
29
|
+
add_message "google.spanner.admin.database.v1.CreateBackupRequest" do
|
30
|
+
optional :parent, :string, 1
|
31
|
+
optional :backup_id, :string, 2
|
32
|
+
optional :backup, :message, 3, "google.spanner.admin.database.v1.Backup"
|
33
|
+
end
|
34
|
+
add_message "google.spanner.admin.database.v1.CreateBackupMetadata" do
|
35
|
+
optional :name, :string, 1
|
36
|
+
optional :database, :string, 2
|
37
|
+
optional :progress, :message, 3, "google.spanner.admin.database.v1.OperationProgress"
|
38
|
+
optional :cancel_time, :message, 4, "google.protobuf.Timestamp"
|
39
|
+
end
|
40
|
+
add_message "google.spanner.admin.database.v1.UpdateBackupRequest" do
|
41
|
+
optional :backup, :message, 1, "google.spanner.admin.database.v1.Backup"
|
42
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
43
|
+
end
|
44
|
+
add_message "google.spanner.admin.database.v1.GetBackupRequest" do
|
45
|
+
optional :name, :string, 1
|
46
|
+
end
|
47
|
+
add_message "google.spanner.admin.database.v1.DeleteBackupRequest" do
|
48
|
+
optional :name, :string, 1
|
49
|
+
end
|
50
|
+
add_message "google.spanner.admin.database.v1.ListBackupsRequest" do
|
51
|
+
optional :parent, :string, 1
|
52
|
+
optional :filter, :string, 2
|
53
|
+
optional :page_size, :int32, 3
|
54
|
+
optional :page_token, :string, 4
|
55
|
+
end
|
56
|
+
add_message "google.spanner.admin.database.v1.ListBackupsResponse" do
|
57
|
+
repeated :backups, :message, 1, "google.spanner.admin.database.v1.Backup"
|
58
|
+
optional :next_page_token, :string, 2
|
59
|
+
end
|
60
|
+
add_message "google.spanner.admin.database.v1.ListBackupOperationsRequest" do
|
61
|
+
optional :parent, :string, 1
|
62
|
+
optional :filter, :string, 2
|
63
|
+
optional :page_size, :int32, 3
|
64
|
+
optional :page_token, :string, 4
|
65
|
+
end
|
66
|
+
add_message "google.spanner.admin.database.v1.ListBackupOperationsResponse" do
|
67
|
+
repeated :operations, :message, 1, "google.longrunning.Operation"
|
68
|
+
optional :next_page_token, :string, 2
|
69
|
+
end
|
70
|
+
add_message "google.spanner.admin.database.v1.BackupInfo" do
|
71
|
+
optional :backup, :string, 1
|
72
|
+
optional :create_time, :message, 2, "google.protobuf.Timestamp"
|
73
|
+
optional :source_database, :string, 3
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
module Google
|
79
|
+
module Cloud
|
80
|
+
module Spanner
|
81
|
+
module Admin
|
82
|
+
module Database
|
83
|
+
module V1
|
84
|
+
Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Backup").msgclass
|
85
|
+
Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Backup.State").enummodule
|
86
|
+
CreateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupRequest").msgclass
|
87
|
+
CreateBackupMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupMetadata").msgclass
|
88
|
+
UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateBackupRequest").msgclass
|
89
|
+
GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetBackupRequest").msgclass
|
90
|
+
DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DeleteBackupRequest").msgclass
|
91
|
+
ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupsRequest").msgclass
|
92
|
+
ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupsResponse").msgclass
|
93
|
+
ListBackupOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsRequest").msgclass
|
94
|
+
ListBackupOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsResponse").msgclass
|
95
|
+
BackupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupInfo").msgclass
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/spanner/admin/database/v1/common.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
require 'google/api/annotations_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_file("google/spanner/admin/database/v1/common.proto", :syntax => :proto3) do
|
11
|
+
add_message "google.spanner.admin.database.v1.OperationProgress" do
|
12
|
+
optional :progress_percent, :int32, 1
|
13
|
+
optional :start_time, :message, 2, "google.protobuf.Timestamp"
|
14
|
+
optional :end_time, :message, 3, "google.protobuf.Timestamp"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
module Google
|
20
|
+
module Cloud
|
21
|
+
module Spanner
|
22
|
+
module Admin
|
23
|
+
module Database
|
24
|
+
module V1
|
25
|
+
OperationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OperationProgress").msgclass
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/spanner/admin/database/v1/spanner_database_admin.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/iam/v1/iam_policy_pb'
|
11
|
+
require 'google/iam/v1/policy_pb'
|
12
|
+
require 'google/longrunning/operations_pb'
|
13
|
+
require 'google/protobuf/empty_pb'
|
14
|
+
require 'google/protobuf/timestamp_pb'
|
15
|
+
require 'google/spanner/admin/database/v1/backup_pb'
|
16
|
+
require 'google/spanner/admin/database/v1/common_pb'
|
17
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
18
|
+
add_file("google/spanner/admin/database/v1/spanner_database_admin.proto", :syntax => :proto3) do
|
19
|
+
add_message "google.spanner.admin.database.v1.RestoreInfo" do
|
20
|
+
optional :source_type, :enum, 1, "google.spanner.admin.database.v1.RestoreSourceType"
|
21
|
+
oneof :source_info do
|
22
|
+
optional :backup_info, :message, 2, "google.spanner.admin.database.v1.BackupInfo"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
add_message "google.spanner.admin.database.v1.Database" do
|
26
|
+
optional :name, :string, 1
|
27
|
+
optional :state, :enum, 2, "google.spanner.admin.database.v1.Database.State"
|
28
|
+
optional :create_time, :message, 3, "google.protobuf.Timestamp"
|
29
|
+
optional :restore_info, :message, 4, "google.spanner.admin.database.v1.RestoreInfo"
|
30
|
+
end
|
31
|
+
add_enum "google.spanner.admin.database.v1.Database.State" do
|
32
|
+
value :STATE_UNSPECIFIED, 0
|
33
|
+
value :CREATING, 1
|
34
|
+
value :READY, 2
|
35
|
+
value :READY_OPTIMIZING, 3
|
36
|
+
end
|
37
|
+
add_message "google.spanner.admin.database.v1.ListDatabasesRequest" do
|
38
|
+
optional :parent, :string, 1
|
39
|
+
optional :page_size, :int32, 3
|
40
|
+
optional :page_token, :string, 4
|
41
|
+
end
|
42
|
+
add_message "google.spanner.admin.database.v1.ListDatabasesResponse" do
|
43
|
+
repeated :databases, :message, 1, "google.spanner.admin.database.v1.Database"
|
44
|
+
optional :next_page_token, :string, 2
|
45
|
+
end
|
46
|
+
add_message "google.spanner.admin.database.v1.CreateDatabaseRequest" do
|
47
|
+
optional :parent, :string, 1
|
48
|
+
optional :create_statement, :string, 2
|
49
|
+
repeated :extra_statements, :string, 3
|
50
|
+
end
|
51
|
+
add_message "google.spanner.admin.database.v1.CreateDatabaseMetadata" do
|
52
|
+
optional :database, :string, 1
|
53
|
+
end
|
54
|
+
add_message "google.spanner.admin.database.v1.GetDatabaseRequest" do
|
55
|
+
optional :name, :string, 1
|
56
|
+
end
|
57
|
+
add_message "google.spanner.admin.database.v1.UpdateDatabaseDdlRequest" do
|
58
|
+
optional :database, :string, 1
|
59
|
+
repeated :statements, :string, 2
|
60
|
+
optional :operation_id, :string, 3
|
61
|
+
end
|
62
|
+
add_message "google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata" do
|
63
|
+
optional :database, :string, 1
|
64
|
+
repeated :statements, :string, 2
|
65
|
+
repeated :commit_timestamps, :message, 3, "google.protobuf.Timestamp"
|
66
|
+
end
|
67
|
+
add_message "google.spanner.admin.database.v1.DropDatabaseRequest" do
|
68
|
+
optional :database, :string, 1
|
69
|
+
end
|
70
|
+
add_message "google.spanner.admin.database.v1.GetDatabaseDdlRequest" do
|
71
|
+
optional :database, :string, 1
|
72
|
+
end
|
73
|
+
add_message "google.spanner.admin.database.v1.GetDatabaseDdlResponse" do
|
74
|
+
repeated :statements, :string, 1
|
75
|
+
end
|
76
|
+
add_message "google.spanner.admin.database.v1.ListDatabaseOperationsRequest" do
|
77
|
+
optional :parent, :string, 1
|
78
|
+
optional :filter, :string, 2
|
79
|
+
optional :page_size, :int32, 3
|
80
|
+
optional :page_token, :string, 4
|
81
|
+
end
|
82
|
+
add_message "google.spanner.admin.database.v1.ListDatabaseOperationsResponse" do
|
83
|
+
repeated :operations, :message, 1, "google.longrunning.Operation"
|
84
|
+
optional :next_page_token, :string, 2
|
85
|
+
end
|
86
|
+
add_message "google.spanner.admin.database.v1.RestoreDatabaseRequest" do
|
87
|
+
optional :parent, :string, 1
|
88
|
+
optional :database_id, :string, 2
|
89
|
+
oneof :source do
|
90
|
+
optional :backup, :string, 3
|
91
|
+
end
|
92
|
+
end
|
93
|
+
add_message "google.spanner.admin.database.v1.RestoreDatabaseMetadata" do
|
94
|
+
optional :name, :string, 1
|
95
|
+
optional :source_type, :enum, 2, "google.spanner.admin.database.v1.RestoreSourceType"
|
96
|
+
optional :progress, :message, 4, "google.spanner.admin.database.v1.OperationProgress"
|
97
|
+
optional :cancel_time, :message, 5, "google.protobuf.Timestamp"
|
98
|
+
optional :optimize_database_operation_name, :string, 6
|
99
|
+
oneof :source_info do
|
100
|
+
optional :backup_info, :message, 3, "google.spanner.admin.database.v1.BackupInfo"
|
101
|
+
end
|
102
|
+
end
|
103
|
+
add_message "google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata" do
|
104
|
+
optional :name, :string, 1
|
105
|
+
optional :progress, :message, 2, "google.spanner.admin.database.v1.OperationProgress"
|
106
|
+
end
|
107
|
+
add_enum "google.spanner.admin.database.v1.RestoreSourceType" do
|
108
|
+
value :TYPE_UNSPECIFIED, 0
|
109
|
+
value :BACKUP, 1
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
module Google
|
115
|
+
module Cloud
|
116
|
+
module Spanner
|
117
|
+
module Admin
|
118
|
+
module Database
|
119
|
+
module V1
|
120
|
+
RestoreInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreInfo").msgclass
|
121
|
+
Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Database").msgclass
|
122
|
+
Database::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Database.State").enummodule
|
123
|
+
ListDatabasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabasesRequest").msgclass
|
124
|
+
ListDatabasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabasesResponse").msgclass
|
125
|
+
CreateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateDatabaseRequest").msgclass
|
126
|
+
CreateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateDatabaseMetadata").msgclass
|
127
|
+
GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseRequest").msgclass
|
128
|
+
UpdateDatabaseDdlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseDdlRequest").msgclass
|
129
|
+
UpdateDatabaseDdlMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata").msgclass
|
130
|
+
DropDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DropDatabaseRequest").msgclass
|
131
|
+
GetDatabaseDdlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseDdlRequest").msgclass
|
132
|
+
GetDatabaseDdlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseDdlResponse").msgclass
|
133
|
+
ListDatabaseOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsRequest").msgclass
|
134
|
+
ListDatabaseOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsResponse").msgclass
|
135
|
+
RestoreDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseRequest").msgclass
|
136
|
+
RestoreDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseMetadata").msgclass
|
137
|
+
OptimizeRestoredDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata").msgclass
|
138
|
+
RestoreSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreSourceType").enummodule
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,170 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/spanner/admin/database/v1/spanner_database_admin.proto for package 'Google.Cloud.Spanner.Admin.Database.V1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2020 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/spanner/admin/database/v1/spanner_database_admin_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Spanner
|
25
|
+
module Admin
|
26
|
+
module Database
|
27
|
+
module V1
|
28
|
+
module DatabaseAdmin
|
29
|
+
# Cloud Spanner Database Admin API
|
30
|
+
#
|
31
|
+
# The Cloud Spanner Database Admin API can be used to create, drop, and
|
32
|
+
# list databases. It also enables updating the schema of pre-existing
|
33
|
+
# databases. It can be also used to create, delete and list backups for a
|
34
|
+
# database and to restore from an existing backup.
|
35
|
+
class Service
|
36
|
+
|
37
|
+
include GRPC::GenericService
|
38
|
+
|
39
|
+
self.marshal_class_method = :encode
|
40
|
+
self.unmarshal_class_method = :decode
|
41
|
+
self.service_name = 'google.spanner.admin.database.v1.DatabaseAdmin'
|
42
|
+
|
43
|
+
# Lists Cloud Spanner databases.
|
44
|
+
rpc :ListDatabases, Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse
|
45
|
+
# Creates a new Cloud Spanner database and starts to prepare it for serving.
|
46
|
+
# The returned [long-running operation][google.longrunning.Operation] will
|
47
|
+
# have a name of the format `<database_name>/operations/<operation_id>` and
|
48
|
+
# can be used to track preparation of the database. The
|
49
|
+
# [metadata][google.longrunning.Operation.metadata] field type is
|
50
|
+
# [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
|
51
|
+
# [response][google.longrunning.Operation.response] field type is
|
52
|
+
# [Database][google.spanner.admin.database.v1.Database], if successful.
|
53
|
+
rpc :CreateDatabase, Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, Google::Longrunning::Operation
|
54
|
+
# Gets the state of a Cloud Spanner database.
|
55
|
+
rpc :GetDatabase, Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, Google::Cloud::Spanner::Admin::Database::V1::Database
|
56
|
+
# Updates the schema of a Cloud Spanner database by
|
57
|
+
# creating/altering/dropping tables, columns, indexes, etc. The returned
|
58
|
+
# [long-running operation][google.longrunning.Operation] will have a name of
|
59
|
+
# the format `<database_name>/operations/<operation_id>` and can be used to
|
60
|
+
# track execution of the schema change(s). The
|
61
|
+
# [metadata][google.longrunning.Operation.metadata] field type is
|
62
|
+
# [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
|
63
|
+
rpc :UpdateDatabaseDdl, Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, Google::Longrunning::Operation
|
64
|
+
# Drops (aka deletes) a Cloud Spanner database.
|
65
|
+
# Completed backups for the database will be retained according to their
|
66
|
+
# `expire_time`.
|
67
|
+
rpc :DropDatabase, Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, Google::Protobuf::Empty
|
68
|
+
# Returns the schema of a Cloud Spanner database as a list of formatted
|
69
|
+
# DDL statements. This method does not show pending schema updates, those may
|
70
|
+
# be queried using the [Operations][google.longrunning.Operations] API.
|
71
|
+
rpc :GetDatabaseDdl, Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse
|
72
|
+
# Sets the access control policy on a database or backup resource.
|
73
|
+
# Replaces any existing policy.
|
74
|
+
#
|
75
|
+
# Authorization requires `spanner.databases.setIamPolicy`
|
76
|
+
# permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
|
77
|
+
# For backups, authorization requires `spanner.backups.setIamPolicy`
|
78
|
+
# permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
|
79
|
+
rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
|
80
|
+
# Gets the access control policy for a database or backup resource.
|
81
|
+
# Returns an empty policy if a database or backup exists but does not have a
|
82
|
+
# policy set.
|
83
|
+
#
|
84
|
+
# Authorization requires `spanner.databases.getIamPolicy` permission on
|
85
|
+
# [resource][google.iam.v1.GetIamPolicyRequest.resource].
|
86
|
+
# For backups, authorization requires `spanner.backups.getIamPolicy`
|
87
|
+
# permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].
|
88
|
+
rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
|
89
|
+
# Returns permissions that the caller has on the specified database or backup
|
90
|
+
# resource.
|
91
|
+
#
|
92
|
+
# Attempting this RPC on a non-existent Cloud Spanner database will
|
93
|
+
# result in a NOT_FOUND error if the user has
|
94
|
+
# `spanner.databases.list` permission on the containing Cloud
|
95
|
+
# Spanner instance. Otherwise returns an empty set of permissions.
|
96
|
+
# Calling this method on a backup that does not exist will
|
97
|
+
# result in a NOT_FOUND error if the user has
|
98
|
+
# `spanner.backups.list` permission on the containing instance.
|
99
|
+
rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
|
100
|
+
# Starts creating a new Cloud Spanner Backup.
|
101
|
+
# The returned backup [long-running operation][google.longrunning.Operation]
|
102
|
+
# will have a name of the format
|
103
|
+
# `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
|
104
|
+
# and can be used to track creation of the backup. The
|
105
|
+
# [metadata][google.longrunning.Operation.metadata] field type is
|
106
|
+
# [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The
|
107
|
+
# [response][google.longrunning.Operation.response] field type is
|
108
|
+
# [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
|
109
|
+
# creation and delete the backup.
|
110
|
+
# There can be only one pending backup creation per database. Backup creation
|
111
|
+
# of different databases can run concurrently.
|
112
|
+
rpc :CreateBackup, Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, Google::Longrunning::Operation
|
113
|
+
# Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
|
114
|
+
rpc :GetBackup, Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, Google::Cloud::Spanner::Admin::Database::V1::Backup
|
115
|
+
# Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
|
116
|
+
rpc :UpdateBackup, Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, Google::Cloud::Spanner::Admin::Database::V1::Backup
|
117
|
+
# Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
|
118
|
+
rpc :DeleteBackup, Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, Google::Protobuf::Empty
|
119
|
+
# Lists completed and pending backups.
|
120
|
+
# Backups returned are ordered by `create_time` in descending order,
|
121
|
+
# starting from the most recent `create_time`.
|
122
|
+
rpc :ListBackups, Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse
|
123
|
+
# Create a new database by restoring from a completed backup. The new
|
124
|
+
# database must be in the same project and in an instance with the same
|
125
|
+
# instance configuration as the instance containing
|
126
|
+
# the backup. The returned database [long-running
|
127
|
+
# operation][google.longrunning.Operation] has a name of the format
|
128
|
+
# `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>`,
|
129
|
+
# and can be used to track the progress of the operation, and to cancel it.
|
130
|
+
# The [metadata][google.longrunning.Operation.metadata] field type is
|
131
|
+
# [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
|
132
|
+
# The [response][google.longrunning.Operation.response] type
|
133
|
+
# is [Database][google.spanner.admin.database.v1.Database], if
|
134
|
+
# successful. Cancelling the returned operation will stop the restore and
|
135
|
+
# delete the database.
|
136
|
+
# There can be only one database being restored into an instance at a time.
|
137
|
+
# Once the restore operation completes, a new restore operation can be
|
138
|
+
# initiated, without waiting for the optimize operation associated with the
|
139
|
+
# first restore to complete.
|
140
|
+
rpc :RestoreDatabase, Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, Google::Longrunning::Operation
|
141
|
+
# Lists database [longrunning-operations][google.longrunning.Operation].
|
142
|
+
# A database operation has a name of the form
|
143
|
+
# `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`.
|
144
|
+
# The long-running operation
|
145
|
+
# [metadata][google.longrunning.Operation.metadata] field type
|
146
|
+
# `metadata.type_url` describes the type of the metadata. Operations returned
|
147
|
+
# include those that have completed/failed/canceled within the last 7 days,
|
148
|
+
# and pending operations.
|
149
|
+
rpc :ListDatabaseOperations, Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse
|
150
|
+
# Lists the backup [long-running operations][google.longrunning.Operation] in
|
151
|
+
# the given instance. A backup operation has a name of the form
|
152
|
+
# `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>`.
|
153
|
+
# The long-running operation
|
154
|
+
# [metadata][google.longrunning.Operation.metadata] field type
|
155
|
+
# `metadata.type_url` describes the type of the metadata. Operations returned
|
156
|
+
# include those that have completed/failed/canceled within the last 7 days,
|
157
|
+
# and pending operations. Operations returned are ordered by
|
158
|
+
# `operation.metadata.value.progress.start_time` in descending order starting
|
159
|
+
# from the most recently started operation.
|
160
|
+
rpc :ListBackupOperations, Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse
|
161
|
+
end
|
162
|
+
|
163
|
+
Stub = Service.rpc_stub_class
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|