google-apis-spanner_v1 0.24.0 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/apis/spanner_v1/classes.rb +413 -247
- data/lib/google/apis/spanner_v1/gem_version.rb +2 -2
- data/lib/google/apis/spanner_v1/representations.rb +52 -0
- data/lib/google/apis/spanner_v1/service.rb +209 -8
- metadata +3 -3
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module SpannerV1
|
18
18
|
# Version of the google-apis-spanner_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.27.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
22
|
GENERATOR_VERSION = "0.4.1"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20220404"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -88,6 +88,24 @@ module Google
|
|
88
88
|
include Google::Apis::Core::JsonObjectSupport
|
89
89
|
end
|
90
90
|
|
91
|
+
class CopyBackupEncryptionConfig
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class CopyBackupMetadata
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class CopyBackupRequest
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
91
109
|
class CreateBackupMetadata
|
92
110
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
111
|
|
@@ -643,7 +661,9 @@ module Google
|
|
643
661
|
property :encryption_info, as: 'encryptionInfo', class: Google::Apis::SpannerV1::EncryptionInfo, decorator: Google::Apis::SpannerV1::EncryptionInfo::Representation
|
644
662
|
|
645
663
|
property :expire_time, as: 'expireTime'
|
664
|
+
property :max_expire_time, as: 'maxExpireTime'
|
646
665
|
property :name, as: 'name'
|
666
|
+
collection :referencing_backups, as: 'referencingBackups'
|
647
667
|
collection :referencing_databases, as: 'referencingDatabases'
|
648
668
|
property :size_bytes, :numeric_string => true, as: 'sizeBytes'
|
649
669
|
property :state, as: 'state'
|
@@ -748,6 +768,36 @@ module Google
|
|
748
768
|
end
|
749
769
|
end
|
750
770
|
|
771
|
+
class CopyBackupEncryptionConfig
|
772
|
+
# @private
|
773
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
774
|
+
property :encryption_type, as: 'encryptionType'
|
775
|
+
property :kms_key_name, as: 'kmsKeyName'
|
776
|
+
end
|
777
|
+
end
|
778
|
+
|
779
|
+
class CopyBackupMetadata
|
780
|
+
# @private
|
781
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
782
|
+
property :cancel_time, as: 'cancelTime'
|
783
|
+
property :name, as: 'name'
|
784
|
+
property :progress, as: 'progress', class: Google::Apis::SpannerV1::OperationProgress, decorator: Google::Apis::SpannerV1::OperationProgress::Representation
|
785
|
+
|
786
|
+
property :source_backup, as: 'sourceBackup'
|
787
|
+
end
|
788
|
+
end
|
789
|
+
|
790
|
+
class CopyBackupRequest
|
791
|
+
# @private
|
792
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
793
|
+
property :backup_id, as: 'backupId'
|
794
|
+
property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::CopyBackupEncryptionConfig, decorator: Google::Apis::SpannerV1::CopyBackupEncryptionConfig::Representation
|
795
|
+
|
796
|
+
property :expire_time, as: 'expireTime'
|
797
|
+
property :source_backup, as: 'sourceBackup'
|
798
|
+
end
|
799
|
+
end
|
800
|
+
|
751
801
|
class CreateBackupMetadata
|
752
802
|
# @private
|
753
803
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -983,6 +1033,7 @@ module Google
|
|
983
1033
|
# @private
|
984
1034
|
class Representation < Google::Apis::Core::JsonRepresentation
|
985
1035
|
property :config, as: 'config'
|
1036
|
+
property :create_time, as: 'createTime'
|
986
1037
|
property :display_name, as: 'displayName'
|
987
1038
|
collection :endpoint_uris, as: 'endpointUris'
|
988
1039
|
hash :labels, as: 'labels'
|
@@ -990,6 +1041,7 @@ module Google
|
|
990
1041
|
property :node_count, as: 'nodeCount'
|
991
1042
|
property :processing_units, as: 'processingUnits'
|
992
1043
|
property :state, as: 'state'
|
1044
|
+
property :update_time, as: 'updateTime'
|
993
1045
|
end
|
994
1046
|
end
|
995
1047
|
|
@@ -120,6 +120,153 @@ module Google
|
|
120
120
|
execute_or_queue_command(command, &block)
|
121
121
|
end
|
122
122
|
|
123
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
124
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
125
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
126
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
127
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
128
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
129
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
130
|
+
# corresponding to `Code.CANCELLED`.
|
131
|
+
# @param [String] name
|
132
|
+
# The name of the operation resource to be cancelled.
|
133
|
+
# @param [String] fields
|
134
|
+
# Selector specifying which fields to include in a partial response.
|
135
|
+
# @param [String] quota_user
|
136
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
137
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
138
|
+
# @param [Google::Apis::RequestOptions] options
|
139
|
+
# Request-specific options
|
140
|
+
#
|
141
|
+
# @yield [result, err] Result & error if block supplied
|
142
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
143
|
+
# @yieldparam err [StandardError] error object if request failed
|
144
|
+
#
|
145
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
146
|
+
#
|
147
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
148
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
149
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
150
|
+
def cancel_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
151
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
152
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
153
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
154
|
+
command.params['name'] = name unless name.nil?
|
155
|
+
command.query['fields'] = fields unless fields.nil?
|
156
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
157
|
+
execute_or_queue_command(command, &block)
|
158
|
+
end
|
159
|
+
|
160
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
161
|
+
# longer interested in the operation result. It does not cancel the operation.
|
162
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
163
|
+
# UNIMPLEMENTED`.
|
164
|
+
# @param [String] name
|
165
|
+
# The name of the operation resource to be deleted.
|
166
|
+
# @param [String] fields
|
167
|
+
# Selector specifying which fields to include in a partial response.
|
168
|
+
# @param [String] quota_user
|
169
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
170
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
171
|
+
# @param [Google::Apis::RequestOptions] options
|
172
|
+
# Request-specific options
|
173
|
+
#
|
174
|
+
# @yield [result, err] Result & error if block supplied
|
175
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
176
|
+
# @yieldparam err [StandardError] error object if request failed
|
177
|
+
#
|
178
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
179
|
+
#
|
180
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
181
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
182
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
183
|
+
def delete_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
184
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
185
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
186
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
187
|
+
command.params['name'] = name unless name.nil?
|
188
|
+
command.query['fields'] = fields unless fields.nil?
|
189
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
190
|
+
execute_or_queue_command(command, &block)
|
191
|
+
end
|
192
|
+
|
193
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
194
|
+
# to poll the operation result at intervals as recommended by the API service.
|
195
|
+
# @param [String] name
|
196
|
+
# The name of the operation resource.
|
197
|
+
# @param [String] fields
|
198
|
+
# Selector specifying which fields to include in a partial response.
|
199
|
+
# @param [String] quota_user
|
200
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
201
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
202
|
+
# @param [Google::Apis::RequestOptions] options
|
203
|
+
# Request-specific options
|
204
|
+
#
|
205
|
+
# @yield [result, err] Result & error if block supplied
|
206
|
+
# @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
|
207
|
+
# @yieldparam err [StandardError] error object if request failed
|
208
|
+
#
|
209
|
+
# @return [Google::Apis::SpannerV1::Operation]
|
210
|
+
#
|
211
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
212
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
213
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
214
|
+
def get_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
215
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
216
|
+
command.response_representation = Google::Apis::SpannerV1::Operation::Representation
|
217
|
+
command.response_class = Google::Apis::SpannerV1::Operation
|
218
|
+
command.params['name'] = name unless name.nil?
|
219
|
+
command.query['fields'] = fields unless fields.nil?
|
220
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
221
|
+
execute_or_queue_command(command, &block)
|
222
|
+
end
|
223
|
+
|
224
|
+
# Lists operations that match the specified filter in the request. If the server
|
225
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
|
226
|
+
# binding allows API services to override the binding to use different resource
|
227
|
+
# name schemes, such as `users/*/operations`. To override the binding, API
|
228
|
+
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
|
229
|
+
# service configuration. For backwards compatibility, the default name includes
|
230
|
+
# the operations collection id, however overriding users must ensure the name
|
231
|
+
# binding is the parent resource, without the operations collection id.
|
232
|
+
# @param [String] name
|
233
|
+
# The name of the operation's parent resource.
|
234
|
+
# @param [String] filter
|
235
|
+
# The standard list filter.
|
236
|
+
# @param [Fixnum] page_size
|
237
|
+
# The standard list page size.
|
238
|
+
# @param [String] page_token
|
239
|
+
# The standard list page token.
|
240
|
+
# @param [String] fields
|
241
|
+
# Selector specifying which fields to include in a partial response.
|
242
|
+
# @param [String] quota_user
|
243
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
244
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
245
|
+
# @param [Google::Apis::RequestOptions] options
|
246
|
+
# Request-specific options
|
247
|
+
#
|
248
|
+
# @yield [result, err] Result & error if block supplied
|
249
|
+
# @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object
|
250
|
+
# @yieldparam err [StandardError] error object if request failed
|
251
|
+
#
|
252
|
+
# @return [Google::Apis::SpannerV1::ListOperationsResponse]
|
253
|
+
#
|
254
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
255
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
256
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
257
|
+
def list_project_instance_config_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
258
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
259
|
+
command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
|
260
|
+
command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
|
261
|
+
command.params['name'] = name unless name.nil?
|
262
|
+
command.query['filter'] = filter unless filter.nil?
|
263
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
264
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
265
|
+
command.query['fields'] = fields unless fields.nil?
|
266
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
267
|
+
execute_or_queue_command(command, &block)
|
268
|
+
end
|
269
|
+
|
123
270
|
# Creates an instance and begins preparing it to begin serving. The returned
|
124
271
|
# long-running operation can be used to track the progress of preparing the new
|
125
272
|
# instance. The instance name is assigned by the caller. If the named instance
|
@@ -492,14 +639,28 @@ module Google
|
|
492
639
|
# operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.
|
493
640
|
# admin.database.v1.CreateBackupMetadata) AND` \ `metadata.database:prod` -
|
494
641
|
# Returns operations where: * The operation's metadata type is
|
495
|
-
# CreateBackupMetadata. * The database
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
501
|
-
#
|
502
|
-
#
|
642
|
+
# CreateBackupMetadata. * The source database name of backup contains the string
|
643
|
+
# "prod". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.
|
644
|
+
# v1.CreateBackupMetadata) AND` \ `(metadata.name:howl) AND` \ `(metadata.
|
645
|
+
# progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ `(error:*)` - Returns
|
646
|
+
# operations where: * The operation's metadata type is CreateBackupMetadata. *
|
647
|
+
# The backup name contains the string "howl". * The operation started before
|
648
|
+
# 2018-03-28T14:50:00Z. * The operation resulted in an error. * `(metadata.@type=
|
649
|
+
# type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \
|
650
|
+
# `(metadata.source_backup:test) AND` \ `(metadata.progress.start_time < \"2022-
|
651
|
+
# 01-18T14:50:00Z\") AND` \ `(error:*)` - Returns operations where: * The
|
652
|
+
# operation's metadata type is CopyBackupMetadata. * The source backup name
|
653
|
+
# contains the string "test". * The operation started before 2022-01-18T14:50:
|
654
|
+
# 00Z. * The operation resulted in an error. * `((metadata.@type=type.googleapis.
|
655
|
+
# com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ `(metadata.
|
656
|
+
# database:test_db)) OR` \ `((metadata.@type=type.googleapis.com/google.spanner.
|
657
|
+
# admin.database.v1.CopyBackupMetadata) AND` \ `(metadata.source_backup:test_bkp)
|
658
|
+
# ) AND` \ `(error:*)` - Returns operations where: * The operation's metadata
|
659
|
+
# matches either of criteria: * The operation's metadata type is
|
660
|
+
# CreateBackupMetadata AND the source database name of the backup contains the
|
661
|
+
# string "test_db" * The operation's metadata type is CopyBackupMetadata AND the
|
662
|
+
# source backup name contains the string "test_bkp" * The operation resulted in
|
663
|
+
# an error.
|
503
664
|
# @param [Fixnum] page_size
|
504
665
|
# Number of operations to be returned in the response. If 0 or less, defaults to
|
505
666
|
# the server's maximum allowed page size.
|
@@ -536,6 +697,46 @@ module Google
|
|
536
697
|
execute_or_queue_command(command, &block)
|
537
698
|
end
|
538
699
|
|
700
|
+
# Starts copying a Cloud Spanner Backup. The returned backup long-running
|
701
|
+
# operation will have a name of the format `projects//instances//backups//
|
702
|
+
# operations/` and can be used to track copying of the backup. The operation is
|
703
|
+
# associated with the destination backup. The metadata field type is
|
704
|
+
# CopyBackupMetadata. The response field type is Backup, if successful.
|
705
|
+
# Cancelling the returned operation will stop the copying and delete the backup.
|
706
|
+
# Concurrent CopyBackup requests can run on the same source backup.
|
707
|
+
# @param [String] parent
|
708
|
+
# Required. The name of the destination instance that will contain the backup
|
709
|
+
# copy. Values are of the form: `projects//instances/`.
|
710
|
+
# @param [Google::Apis::SpannerV1::CopyBackupRequest] copy_backup_request_object
|
711
|
+
# @param [String] fields
|
712
|
+
# Selector specifying which fields to include in a partial response.
|
713
|
+
# @param [String] quota_user
|
714
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
715
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
716
|
+
# @param [Google::Apis::RequestOptions] options
|
717
|
+
# Request-specific options
|
718
|
+
#
|
719
|
+
# @yield [result, err] Result & error if block supplied
|
720
|
+
# @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
|
721
|
+
# @yieldparam err [StandardError] error object if request failed
|
722
|
+
#
|
723
|
+
# @return [Google::Apis::SpannerV1::Operation]
|
724
|
+
#
|
725
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
726
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
727
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
728
|
+
def copy_backup(parent, copy_backup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
729
|
+
command = make_simple_command(:post, 'v1/{+parent}/backups:copy', options)
|
730
|
+
command.request_representation = Google::Apis::SpannerV1::CopyBackupRequest::Representation
|
731
|
+
command.request_object = copy_backup_request_object
|
732
|
+
command.response_representation = Google::Apis::SpannerV1::Operation::Representation
|
733
|
+
command.response_class = Google::Apis::SpannerV1::Operation
|
734
|
+
command.params['parent'] = parent unless parent.nil?
|
735
|
+
command.query['fields'] = fields unless fields.nil?
|
736
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
737
|
+
execute_or_queue_command(command, &block)
|
738
|
+
end
|
739
|
+
|
539
740
|
# Starts creating a new Cloud Spanner Backup. The returned backup long-running
|
540
741
|
# operation will have a name of the format `projects//instances//backups//
|
541
742
|
# operations/` and can be used to track creation of the backup. The metadata
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-spanner_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.27.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: 2022-
|
11
|
+
date: 2022-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -58,7 +58,7 @@ licenses:
|
|
58
58
|
metadata:
|
59
59
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
60
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-spanner_v1/CHANGELOG.md
|
61
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.27.0
|
62
62
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-spanner_v1
|
63
63
|
post_install_message:
|
64
64
|
rdoc_options: []
|