google-cloud-spanner-admin-database-v1 0.18.0 → 0.20.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 +4 -4
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +658 -90
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +13 -5
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb +21 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb +623 -90
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb +11 -4
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb +321 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb +1 -1
- data/lib/google/cloud/spanner/admin/database/v1/database_admin.rb +1 -1
- data/lib/google/cloud/spanner/admin/database/v1/version.rb +1 -1
- data/lib/google/spanner/admin/database/v1/backup_pb.rb +2 -1
- data/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb +65 -0
- data/lib/google/spanner/admin/database/v1/common_pb.rb +1 -1
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +2 -1
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +31 -16
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/spanner/admin/database/v1/backup.rb +158 -69
- data/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb +213 -0
- data/proto_docs/google/spanner/admin/database/v1/common.rb +23 -6
- data/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +91 -54
- metadata +4 -2
@@ -0,0 +1,213 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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
|
+
# Defines specifications of the backup schedule.
|
27
|
+
# @!attribute [rw] cron_spec
|
28
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::CrontabSpec]
|
29
|
+
# Cron style schedule specification.
|
30
|
+
class BackupScheduleSpec
|
31
|
+
include ::Google::Protobuf::MessageExts
|
32
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
33
|
+
end
|
34
|
+
|
35
|
+
# BackupSchedule expresses the automated backup creation specification for a
|
36
|
+
# Spanner database.
|
37
|
+
# Next ID: 10
|
38
|
+
# @!attribute [rw] name
|
39
|
+
# @return [::String]
|
40
|
+
# Identifier. Output only for the
|
41
|
+
# [CreateBackupSchedule][DatabaseAdmin.CreateBackupSchededule] operation.
|
42
|
+
# Required for the
|
43
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule UpdateBackupSchedule}
|
44
|
+
# operation. A globally unique identifier for the backup schedule which
|
45
|
+
# cannot be changed. Values are of the form
|
46
|
+
# `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/[a-z][a-z0-9_\-]*[a-z0-9]`
|
47
|
+
# The final segment of the name must be between 2 and 60 characters in
|
48
|
+
# length.
|
49
|
+
# @!attribute [rw] spec
|
50
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupScheduleSpec]
|
51
|
+
# Optional. The schedule specification based on which the backup creations
|
52
|
+
# are triggered.
|
53
|
+
# @!attribute [rw] retention_duration
|
54
|
+
# @return [::Google::Protobuf::Duration]
|
55
|
+
# Optional. The retention duration of a backup that must be at least 6 hours
|
56
|
+
# and at most 366 days. The backup is eligible to be automatically deleted
|
57
|
+
# once the retention period has elapsed.
|
58
|
+
# @!attribute [rw] encryption_config
|
59
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig]
|
60
|
+
# Optional. The encryption configuration that will be used to encrypt the
|
61
|
+
# backup. If this field is not specified, the backup will use the same
|
62
|
+
# encryption configuration as the database.
|
63
|
+
# @!attribute [rw] full_backup_spec
|
64
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::FullBackupSpec]
|
65
|
+
# The schedule creates only full backups.
|
66
|
+
# @!attribute [r] update_time
|
67
|
+
# @return [::Google::Protobuf::Timestamp]
|
68
|
+
# Output only. The timestamp at which the schedule was last updated.
|
69
|
+
# If the schedule has never been updated, this field contains the timestamp
|
70
|
+
# when the schedule was first created.
|
71
|
+
class BackupSchedule
|
72
|
+
include ::Google::Protobuf::MessageExts
|
73
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
74
|
+
end
|
75
|
+
|
76
|
+
# CrontabSpec can be used to specify the version time and frequency at
|
77
|
+
# which the backup should be created.
|
78
|
+
# @!attribute [rw] text
|
79
|
+
# @return [::String]
|
80
|
+
# Required. Textual representation of the crontab. User can customize the
|
81
|
+
# backup frequency and the backup version time using the cron
|
82
|
+
# expression. The version time must be in UTC timzeone.
|
83
|
+
#
|
84
|
+
# The backup will contain an externally consistent copy of the
|
85
|
+
# database at the version time. Allowed frequencies are 12 hour, 1 day,
|
86
|
+
# 1 week and 1 month. Examples of valid cron specifications:
|
87
|
+
# * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC.
|
88
|
+
# * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC.
|
89
|
+
# * `0 2 * * * ` : once a day at 2 past midnight in UTC.
|
90
|
+
# * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC.
|
91
|
+
# * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC.
|
92
|
+
# @!attribute [r] time_zone
|
93
|
+
# @return [::String]
|
94
|
+
# Output only. The time zone of the times in `CrontabSpec.text`. Currently
|
95
|
+
# only UTC is supported.
|
96
|
+
# @!attribute [r] creation_window
|
97
|
+
# @return [::Google::Protobuf::Duration]
|
98
|
+
# Output only. Schedule backups will contain an externally consistent copy
|
99
|
+
# of the database at the version time specified in
|
100
|
+
# `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
|
101
|
+
# of the scheduled backups at that version time. Spanner will initiate
|
102
|
+
# the creation of scheduled backups within the time window bounded by the
|
103
|
+
# version_time specified in `schedule_spec.cron_spec` and version_time +
|
104
|
+
# `creation_window`.
|
105
|
+
class CrontabSpec
|
106
|
+
include ::Google::Protobuf::MessageExts
|
107
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
108
|
+
end
|
109
|
+
|
110
|
+
# The request for
|
111
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup_schedule CreateBackupSchedule}.
|
112
|
+
# @!attribute [rw] parent
|
113
|
+
# @return [::String]
|
114
|
+
# Required. The name of the database that this backup schedule applies to.
|
115
|
+
# @!attribute [rw] backup_schedule_id
|
116
|
+
# @return [::String]
|
117
|
+
# Required. The Id to use for the backup schedule. The `backup_schedule_id`
|
118
|
+
# appended to `parent` forms the full backup schedule name of the form
|
119
|
+
# `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
|
120
|
+
# @!attribute [rw] backup_schedule
|
121
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule]
|
122
|
+
# Required. The backup schedule to create.
|
123
|
+
class CreateBackupScheduleRequest
|
124
|
+
include ::Google::Protobuf::MessageExts
|
125
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
126
|
+
end
|
127
|
+
|
128
|
+
# The request for
|
129
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup_schedule GetBackupSchedule}.
|
130
|
+
# @!attribute [rw] name
|
131
|
+
# @return [::String]
|
132
|
+
# Required. The name of the schedule to retrieve.
|
133
|
+
# Values are of the form
|
134
|
+
# `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
|
135
|
+
class GetBackupScheduleRequest
|
136
|
+
include ::Google::Protobuf::MessageExts
|
137
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
138
|
+
end
|
139
|
+
|
140
|
+
# The request for
|
141
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup_schedule DeleteBackupSchedule}.
|
142
|
+
# @!attribute [rw] name
|
143
|
+
# @return [::String]
|
144
|
+
# Required. The name of the schedule to delete.
|
145
|
+
# Values are of the form
|
146
|
+
# `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
|
147
|
+
class DeleteBackupScheduleRequest
|
148
|
+
include ::Google::Protobuf::MessageExts
|
149
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
150
|
+
end
|
151
|
+
|
152
|
+
# The request for
|
153
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules ListBackupSchedules}.
|
154
|
+
# @!attribute [rw] parent
|
155
|
+
# @return [::String]
|
156
|
+
# Required. Database is the parent resource whose backup schedules should be
|
157
|
+
# listed. Values are of the form
|
158
|
+
# projects/<project>/instances/<instance>/databases/<database>
|
159
|
+
# @!attribute [rw] page_size
|
160
|
+
# @return [::Integer]
|
161
|
+
# Optional. Number of backup schedules to be returned in the response. If 0
|
162
|
+
# or less, defaults to the server's maximum allowed page size.
|
163
|
+
# @!attribute [rw] page_token
|
164
|
+
# @return [::String]
|
165
|
+
# Optional. If non-empty, `page_token` should contain a
|
166
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse#next_page_token next_page_token}
|
167
|
+
# from a previous
|
168
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse ListBackupSchedulesResponse}
|
169
|
+
# to the same `parent`.
|
170
|
+
class ListBackupSchedulesRequest
|
171
|
+
include ::Google::Protobuf::MessageExts
|
172
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
173
|
+
end
|
174
|
+
|
175
|
+
# The response for
|
176
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules ListBackupSchedules}.
|
177
|
+
# @!attribute [rw] backup_schedules
|
178
|
+
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>]
|
179
|
+
# The list of backup schedules for a database.
|
180
|
+
# @!attribute [rw] next_page_token
|
181
|
+
# @return [::String]
|
182
|
+
# `next_page_token` can be sent in a subsequent
|
183
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules ListBackupSchedules}
|
184
|
+
# call to fetch more of the schedules.
|
185
|
+
class ListBackupSchedulesResponse
|
186
|
+
include ::Google::Protobuf::MessageExts
|
187
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
188
|
+
end
|
189
|
+
|
190
|
+
# The request for
|
191
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule UpdateBackupScheduleRequest}.
|
192
|
+
# @!attribute [rw] backup_schedule
|
193
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule]
|
194
|
+
# Required. The backup schedule to update. `backup_schedule.name`, and the
|
195
|
+
# fields to be updated as specified by `update_mask` are required. Other
|
196
|
+
# fields are ignored.
|
197
|
+
# @!attribute [rw] update_mask
|
198
|
+
# @return [::Google::Protobuf::FieldMask]
|
199
|
+
# Required. A mask specifying which fields in the BackupSchedule resource
|
200
|
+
# should be updated. This mask is relative to the BackupSchedule resource,
|
201
|
+
# not to the request message. The field mask must always be
|
202
|
+
# specified; this prevents any future fields from being erased
|
203
|
+
# accidentally.
|
204
|
+
class UpdateBackupScheduleRequest
|
205
|
+
include ::Google::Protobuf::MessageExts
|
206
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
@@ -47,6 +47,23 @@ module Google
|
|
47
47
|
# The Cloud KMS key to be used for encrypting and decrypting
|
48
48
|
# the database. Values are of the form
|
49
49
|
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
50
|
+
# @!attribute [rw] kms_key_names
|
51
|
+
# @return [::Array<::String>]
|
52
|
+
# Specifies the KMS configuration for the one or more keys used to encrypt
|
53
|
+
# the database. Values are of the form
|
54
|
+
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
55
|
+
#
|
56
|
+
# The keys referenced by kms_key_names must fully cover all
|
57
|
+
# regions of the database instance configuration. Some examples:
|
58
|
+
# * For single region database instance configs, specify a single regional
|
59
|
+
# location KMS key.
|
60
|
+
# * For multi-regional database instance configs of type GOOGLE_MANAGED,
|
61
|
+
# either specify a multi-regional location KMS key or multiple regional
|
62
|
+
# location KMS keys that cover all regions in the instance config.
|
63
|
+
# * For a database instance config of type USER_MANAGED, please specify only
|
64
|
+
# regional location KMS keys to cover each region in the instance config.
|
65
|
+
# Multi-regional location KMS keys are not supported for USER_MANAGED
|
66
|
+
# instance configs.
|
50
67
|
class EncryptionConfig
|
51
68
|
include ::Google::Protobuf::MessageExts
|
52
69
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -58,13 +75,13 @@ module Google
|
|
58
75
|
# Output only. The type of encryption.
|
59
76
|
# @!attribute [r] encryption_status
|
60
77
|
# @return [::Google::Rpc::Status]
|
61
|
-
# Output only. If present, the status of a recent encrypt/decrypt call on
|
62
|
-
# for this database or backup. Regardless of status, data is
|
63
|
-
# at rest.
|
78
|
+
# Output only. If present, the status of a recent encrypt/decrypt call on
|
79
|
+
# underlying data for this database or backup. Regardless of status, data is
|
80
|
+
# always encrypted at rest.
|
64
81
|
# @!attribute [r] kms_key_version
|
65
82
|
# @return [::String]
|
66
|
-
# Output only. A Cloud KMS key version that is being used to protect the
|
67
|
-
# backup.
|
83
|
+
# Output only. A Cloud KMS key version that is being used to protect the
|
84
|
+
# database or backup.
|
68
85
|
class EncryptionInfo
|
69
86
|
include ::Google::Protobuf::MessageExts
|
70
87
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -92,7 +109,7 @@ module Google
|
|
92
109
|
# GOOGLE_STANDARD_SQL dialect.
|
93
110
|
DATABASE_DIALECT_UNSPECIFIED = 0
|
94
111
|
|
95
|
-
#
|
112
|
+
# GoogleSQL supported SQL.
|
96
113
|
GOOGLE_STANDARD_SQL = 1
|
97
114
|
|
98
115
|
# PostgreSQL supported SQL.
|
@@ -64,7 +64,8 @@ module Google
|
|
64
64
|
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo>]
|
65
65
|
# Output only. For databases that are using customer managed encryption, this
|
66
66
|
# field contains the encryption information for the database, such as
|
67
|
-
#
|
67
|
+
# all Cloud KMS key versions that are in use. The `encryption_status' field
|
68
|
+
# inside of each `EncryptionInfo` is not populated.
|
68
69
|
#
|
69
70
|
# For databases that are using Google default or other types of encryption,
|
70
71
|
# this field is empty.
|
@@ -76,8 +77,8 @@ module Google
|
|
76
77
|
# Output only. The period in which Cloud Spanner retains all versions of data
|
77
78
|
# for the database. This is the same as the value of version_retention_period
|
78
79
|
# database option set using
|
79
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}.
|
80
|
-
# if not set.
|
80
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}.
|
81
|
+
# Defaults to 1 hour, if not set.
|
81
82
|
# @!attribute [r] earliest_version_time
|
82
83
|
# @return [::Google::Protobuf::Timestamp]
|
83
84
|
# Output only. Earliest timestamp at which older versions of the data can be
|
@@ -99,7 +100,9 @@ module Google
|
|
99
100
|
# @!attribute [rw] enable_drop_protection
|
100
101
|
# @return [::Boolean]
|
101
102
|
# Whether drop protection is enabled for this database. Defaults to false,
|
102
|
-
# if not set.
|
103
|
+
# if not set. For more details, please see how to [prevent accidental
|
104
|
+
# database
|
105
|
+
# deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).
|
103
106
|
# @!attribute [r] reconciling
|
104
107
|
# @return [::Boolean]
|
105
108
|
# Output only. If true, the database is being updated. If false, there are no
|
@@ -132,7 +135,8 @@ module Google
|
|
132
135
|
end
|
133
136
|
end
|
134
137
|
|
135
|
-
# The request for
|
138
|
+
# The request for
|
139
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
|
136
140
|
# @!attribute [rw] parent
|
137
141
|
# @return [::String]
|
138
142
|
# Required. The instance whose databases should be listed.
|
@@ -144,28 +148,31 @@ module Google
|
|
144
148
|
# @!attribute [rw] page_token
|
145
149
|
# @return [::String]
|
146
150
|
# If non-empty, `page_token` should contain a
|
147
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token}
|
148
|
-
#
|
151
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token}
|
152
|
+
# from a previous
|
153
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
|
149
154
|
class ListDatabasesRequest
|
150
155
|
include ::Google::Protobuf::MessageExts
|
151
156
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
152
157
|
end
|
153
158
|
|
154
|
-
# The response for
|
159
|
+
# The response for
|
160
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
|
155
161
|
# @!attribute [rw] databases
|
156
162
|
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Database>]
|
157
163
|
# Databases that matched the request.
|
158
164
|
# @!attribute [rw] next_page_token
|
159
165
|
# @return [::String]
|
160
166
|
# `next_page_token` can be sent in a subsequent
|
161
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}
|
162
|
-
# of the matching databases.
|
167
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}
|
168
|
+
# call to fetch more of the matching databases.
|
163
169
|
class ListDatabasesResponse
|
164
170
|
include ::Google::Protobuf::MessageExts
|
165
171
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
166
172
|
end
|
167
173
|
|
168
|
-
# The request for
|
174
|
+
# The request for
|
175
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}.
|
169
176
|
# @!attribute [rw] parent
|
170
177
|
# @return [::String]
|
171
178
|
# Required. The name of the instance that will serve the new database.
|
@@ -185,8 +192,8 @@ module Google
|
|
185
192
|
# if there is an error in any statement, the database is not created.
|
186
193
|
# @!attribute [rw] encryption_config
|
187
194
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig]
|
188
|
-
# Optional. The encryption configuration for the database. If this field is
|
189
|
-
# specified, Cloud Spanner will encrypt/decrypt all data at rest using
|
195
|
+
# Optional. The encryption configuration for the database. If this field is
|
196
|
+
# not specified, Cloud Spanner will encrypt/decrypt all data at rest using
|
190
197
|
# Google default encryption.
|
191
198
|
# @!attribute [rw] database_dialect
|
192
199
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect]
|
@@ -223,7 +230,8 @@ module Google
|
|
223
230
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
224
231
|
end
|
225
232
|
|
226
|
-
# The request for
|
233
|
+
# The request for
|
234
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database GetDatabase}.
|
227
235
|
# @!attribute [rw] name
|
228
236
|
# @return [::String]
|
229
237
|
# Required. The name of the requested database. Values are of the form
|
@@ -283,8 +291,8 @@ module Google
|
|
283
291
|
# Each batch of statements is assigned a name which can be used with
|
284
292
|
# the Operations API to monitor
|
285
293
|
# progress. See the
|
286
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#operation_id operation_id}
|
287
|
-
# details.
|
294
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#operation_id operation_id}
|
295
|
+
# field for more details.
|
288
296
|
# @!attribute [rw] database
|
289
297
|
# @return [::String]
|
290
298
|
# Required. The database to update.
|
@@ -300,18 +308,20 @@ module Google
|
|
300
308
|
#
|
301
309
|
# Specifying an explicit operation ID simplifies determining
|
302
310
|
# whether the statements were executed in the event that the
|
303
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
|
304
|
-
# or the return value is otherwise lost: the
|
305
|
-
#
|
311
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
|
312
|
+
# call is replayed, or the return value is otherwise lost: the
|
313
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database}
|
314
|
+
# and `operation_id` fields can be combined to form the
|
306
315
|
# {::Google::Longrunning::Operation#name name} of the resulting
|
307
|
-
# {::Google::Longrunning::Operation longrunning.Operation}:
|
316
|
+
# {::Google::Longrunning::Operation longrunning.Operation}:
|
317
|
+
# `<database>/operations/<operation_id>`.
|
308
318
|
#
|
309
319
|
# `operation_id` should be unique within the database, and must be
|
310
320
|
# a valid identifier: `[a-z][a-z0-9_]*`. Note that
|
311
321
|
# automatically-generated operation IDs always begin with an
|
312
322
|
# underscore. If the named operation already exists,
|
313
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
|
314
|
-
# `ALREADY_EXISTS`.
|
323
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
|
324
|
+
# returns `ALREADY_EXISTS`.
|
315
325
|
# @!attribute [rw] proto_descriptors
|
316
326
|
# @return [::String]
|
317
327
|
# Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements.
|
@@ -394,7 +404,8 @@ module Google
|
|
394
404
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
395
405
|
end
|
396
406
|
|
397
|
-
# The request for
|
407
|
+
# The request for
|
408
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database DropDatabase}.
|
398
409
|
# @!attribute [rw] database
|
399
410
|
# @return [::String]
|
400
411
|
# Required. The database to be dropped.
|
@@ -403,7 +414,8 @@ module Google
|
|
403
414
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
404
415
|
end
|
405
416
|
|
406
|
-
# The request for
|
417
|
+
# The request for
|
418
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
|
407
419
|
# @!attribute [rw] database
|
408
420
|
# @return [::String]
|
409
421
|
# Required. The database whose schema we wish to get.
|
@@ -414,7 +426,8 @@ module Google
|
|
414
426
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
415
427
|
end
|
416
428
|
|
417
|
-
# The response for
|
429
|
+
# The response for
|
430
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
|
418
431
|
# @!attribute [rw] statements
|
419
432
|
# @return [::Array<::String>]
|
420
433
|
# A list of formatted DDL statements defining the schema of the database
|
@@ -453,7 +466,9 @@ module Google
|
|
453
466
|
# * `name` - The name of the long-running operation
|
454
467
|
# * `done` - False if the operation is in progress, else true.
|
455
468
|
# * `metadata.@type` - the type of metadata. For example, the type string
|
456
|
-
# for
|
469
|
+
# for
|
470
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}
|
471
|
+
# is
|
457
472
|
# `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
|
458
473
|
# * `metadata.<field_name>` - any field in metadata.value.
|
459
474
|
# `metadata.@type` must be specified first, if filtering on metadata
|
@@ -475,7 +490,8 @@ module Google
|
|
475
490
|
# `(metadata.name:restored_howl) AND` \
|
476
491
|
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
477
492
|
# `(error:*)` - Return operations where:
|
478
|
-
# * The operation's metadata type is
|
493
|
+
# * The operation's metadata type is
|
494
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
|
479
495
|
# * The database is restored from a backup.
|
480
496
|
# * The backup name contains "backup_howl".
|
481
497
|
# * The restored database's name contains "restored_howl".
|
@@ -489,8 +505,9 @@ module Google
|
|
489
505
|
# @return [::String]
|
490
506
|
# If non-empty, `page_token` should contain a
|
491
507
|
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token}
|
492
|
-
# from a previous
|
493
|
-
#
|
508
|
+
# from a previous
|
509
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse}
|
510
|
+
# to the same `parent` and with the same `filter`.
|
494
511
|
class ListDatabaseOperationsRequest
|
495
512
|
include ::Google::Protobuf::MessageExts
|
496
513
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -536,12 +553,12 @@ module Google
|
|
536
553
|
# `projects/<project>/instances/<instance>/backups/<backup>`.
|
537
554
|
# @!attribute [rw] encryption_config
|
538
555
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig]
|
539
|
-
# Optional. An encryption configuration describing the encryption type and
|
540
|
-
# resources in Cloud KMS used to encrypt/decrypt the database to restore
|
541
|
-
# If this field is not specified, the restored database will use
|
542
|
-
#
|
543
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
|
544
|
-
# `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
|
556
|
+
# Optional. An encryption configuration describing the encryption type and
|
557
|
+
# key resources in Cloud KMS used to encrypt/decrypt the database to restore
|
558
|
+
# to. If this field is not specified, the restored database will use the same
|
559
|
+
# encryption configuration as the backup by default, namely
|
560
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
|
561
|
+
# = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
|
545
562
|
class RestoreDatabaseRequest
|
546
563
|
include ::Google::Protobuf::MessageExts
|
547
564
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -553,11 +570,28 @@ module Google
|
|
553
570
|
# Required. The encryption type of the restored database.
|
554
571
|
# @!attribute [rw] kms_key_name
|
555
572
|
# @return [::String]
|
556
|
-
# Optional. The Cloud KMS key that will be used to encrypt/decrypt the
|
557
|
-
# database. This field should be set only when
|
558
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
|
559
|
-
# `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
573
|
+
# Optional. The Cloud KMS key that will be used to encrypt/decrypt the
|
574
|
+
# restored database. This field should be set only when
|
575
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
|
576
|
+
# is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
577
|
+
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
578
|
+
# @!attribute [rw] kms_key_names
|
579
|
+
# @return [::Array<::String>]
|
580
|
+
# Optional. Specifies the KMS configuration for the one or more keys used to
|
581
|
+
# encrypt the database. Values are of the form
|
560
582
|
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
583
|
+
#
|
584
|
+
# The keys referenced by kms_key_names must fully cover all
|
585
|
+
# regions of the database instance configuration. Some examples:
|
586
|
+
# * For single region database instance configs, specify a single regional
|
587
|
+
# location KMS key.
|
588
|
+
# * For multi-regional database instance configs of type GOOGLE_MANAGED,
|
589
|
+
# either specify a multi-regional location KMS key or multiple regional
|
590
|
+
# location KMS keys that cover all regions in the instance config.
|
591
|
+
# * For a database instance config of type USER_MANAGED, please specify only
|
592
|
+
# regional location KMS keys to cover each region in the instance config.
|
593
|
+
# Multi-regional location KMS keys are not supported for USER_MANAGED
|
594
|
+
# instance configs.
|
561
595
|
class RestoreDatabaseEncryptionConfig
|
562
596
|
include ::Google::Protobuf::MessageExts
|
563
597
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -568,7 +602,8 @@ module Google
|
|
568
602
|
ENCRYPTION_TYPE_UNSPECIFIED = 0
|
569
603
|
|
570
604
|
# This is the default option when
|
571
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig encryption_config}
|
605
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig encryption_config}
|
606
|
+
# is not specified.
|
572
607
|
USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1
|
573
608
|
|
574
609
|
# Use Google default encryption.
|
@@ -608,7 +643,8 @@ module Google
|
|
608
643
|
# operation completed despite cancellation. On successful cancellation,
|
609
644
|
# the operation is not deleted; instead, it becomes an operation with
|
610
645
|
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
611
|
-
# {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to
|
646
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to
|
647
|
+
# `Code.CANCELLED`.
|
612
648
|
# @!attribute [rw] optimize_database_operation_name
|
613
649
|
# @return [::String]
|
614
650
|
# If exists, the name of the long-running operation that will be used to
|
@@ -618,10 +654,10 @@ module Google
|
|
618
654
|
# `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
|
619
655
|
# where the <database> is the name of database being created and restored to.
|
620
656
|
# The metadata type of the long-running operation is
|
621
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::OptimizeRestoredDatabaseMetadata OptimizeRestoredDatabaseMetadata}.
|
622
|
-
# automatically created by the system
|
623
|
-
#
|
624
|
-
# restore was not successful.
|
657
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::OptimizeRestoredDatabaseMetadata OptimizeRestoredDatabaseMetadata}.
|
658
|
+
# This long-running operation will be automatically created by the system
|
659
|
+
# after the RestoreDatabase long-running operation completes successfully.
|
660
|
+
# This operation will not be created if the restore was not successful.
|
625
661
|
class RestoreDatabaseMetadata
|
626
662
|
include ::Google::Protobuf::MessageExts
|
627
663
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -646,21 +682,20 @@ module Google
|
|
646
682
|
# @!attribute [rw] name
|
647
683
|
# @return [::String]
|
648
684
|
# Required. The name of the database role. Values are of the form
|
649
|
-
# `projects/<project>/instances/<instance>/databases/<database>/databaseRoles
|
650
|
-
#
|
651
|
-
# DDL statement. This name can be passed to Get/Set IAMPolicy methods to
|
652
|
-
# identify the database role.
|
685
|
+
# `projects/<project>/instances/<instance>/databases/<database>/databaseRoles/<role>`
|
686
|
+
# where `<role>` is as specified in the `CREATE ROLE` DDL statement.
|
653
687
|
class DatabaseRole
|
654
688
|
include ::Google::Protobuf::MessageExts
|
655
689
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
656
690
|
end
|
657
691
|
|
658
|
-
# The request for
|
692
|
+
# The request for
|
693
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles ListDatabaseRoles}.
|
659
694
|
# @!attribute [rw] parent
|
660
695
|
# @return [::String]
|
661
696
|
# Required. The database whose roles should be listed.
|
662
697
|
# Values are of the form
|
663
|
-
# `projects/<project>/instances/<instance>/databases/<database
|
698
|
+
# `projects/<project>/instances/<instance>/databases/<database>`.
|
664
699
|
# @!attribute [rw] page_size
|
665
700
|
# @return [::Integer]
|
666
701
|
# Number of database roles to be returned in the response. If 0 or less,
|
@@ -668,14 +703,16 @@ module Google
|
|
668
703
|
# @!attribute [rw] page_token
|
669
704
|
# @return [::String]
|
670
705
|
# If non-empty, `page_token` should contain a
|
671
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token}
|
672
|
-
#
|
706
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token}
|
707
|
+
# from a previous
|
708
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}.
|
673
709
|
class ListDatabaseRolesRequest
|
674
710
|
include ::Google::Protobuf::MessageExts
|
675
711
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
676
712
|
end
|
677
713
|
|
678
|
-
# The response for
|
714
|
+
# The response for
|
715
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles ListDatabaseRoles}.
|
679
716
|
# @!attribute [rw] database_roles
|
680
717
|
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>]
|
681
718
|
# Database roles that matched the request.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-spanner-admin-database-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- lib/google/cloud/spanner/admin/database/v1/rest.rb
|
86
86
|
- lib/google/cloud/spanner/admin/database/v1/version.rb
|
87
87
|
- lib/google/spanner/admin/database/v1/backup_pb.rb
|
88
|
+
- lib/google/spanner/admin/database/v1/backup_schedule_pb.rb
|
88
89
|
- lib/google/spanner/admin/database/v1/common_pb.rb
|
89
90
|
- lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb
|
90
91
|
- lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb
|
@@ -104,6 +105,7 @@ files:
|
|
104
105
|
- proto_docs/google/protobuf/timestamp.rb
|
105
106
|
- proto_docs/google/rpc/status.rb
|
106
107
|
- proto_docs/google/spanner/admin/database/v1/backup.rb
|
108
|
+
- proto_docs/google/spanner/admin/database/v1/backup_schedule.rb
|
107
109
|
- proto_docs/google/spanner/admin/database/v1/common.rb
|
108
110
|
- proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb
|
109
111
|
- proto_docs/google/type/expr.rb
|