google-apis-spanner_v1 0.36.0 → 0.38.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.
@@ -33,6 +33,8 @@ module Google
33
33
  #
34
34
  # @see https://cloud.google.com/spanner/
35
35
  class SpannerService < Google::Apis::Core::BaseService
36
+ DEFAULT_ENDPOINT_TEMPLATE = "https://spanner.$UNIVERSE_DOMAIN$/"
37
+
36
38
  # @return [String]
37
39
  # API key. Your API key identifies your project and provides you with API access,
38
40
  # quota, and reports. Required unless you provide an OAuth 2.0 token.
@@ -44,12 +46,184 @@ module Google
44
46
  attr_accessor :quota_user
45
47
 
46
48
  def initialize
47
- super('https://spanner.googleapis.com/', '',
49
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
48
50
  client_name: 'google-apis-spanner_v1',
49
51
  client_version: Google::Apis::SpannerV1::GEM_VERSION)
50
52
  @batch_path = 'batch'
51
53
  end
52
54
 
55
+ # Lists the user-managed instance configuration long-running operations in the
56
+ # given project. An instance configuration operation has a name of the form `
57
+ # projects//instanceConfigs//operations/`. The long-running operation metadata
58
+ # field type `metadata.type_url` describes the type of the metadata. Operations
59
+ # returned include those that have completed/failed/canceled within the last 7
60
+ # days, and pending operations. Operations returned are ordered by `operation.
61
+ # metadata.value.start_time` in descending order starting from the most recently
62
+ # started operation.
63
+ # @param [String] parent
64
+ # Required. The project of the instance configuration operations. Values are of
65
+ # the form `projects/`.
66
+ # @param [String] filter
67
+ # An expression that filters the list of returned operations. A filter
68
+ # expression consists of a field name, a comparison operator, and a value for
69
+ # filtering. The value must be a string, a number, or a boolean. The comparison
70
+ # operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is
71
+ # the contains operator. Filter rules are not case sensitive. The following
72
+ # fields in the Operation are eligible for filtering: * `name` - The name of the
73
+ # long-running operation * `done` - False if the operation is in progress, else
74
+ # true. * `metadata.@type` - the type of metadata. For example, the type string
75
+ # for CreateInstanceConfigMetadata is `type.googleapis.com/google.spanner.admin.
76
+ # instance.v1.CreateInstanceConfigMetadata`. * `metadata.` - any field in
77
+ # metadata.value. `metadata.@type` must be specified first, if filtering on
78
+ # metadata fields. * `error` - Error associated with the long-running operation.
79
+ # * `response.@type` - the type of response. * `response.` - any field in
80
+ # response.value. You can combine multiple expressions by enclosing each
81
+ # expression in parentheses. By default, expressions are combined with AND logic.
82
+ # However, you can specify AND, OR, and NOT logic explicitly. Here are a few
83
+ # examples: * `done:true` - The operation is complete. * `(metadata.@type=` \ `
84
+ # type.googleapis.com/google.spanner.admin.instance.v1.
85
+ # CreateInstanceConfigMetadata) AND` \ `(metadata.instance_config.name:custom-
86
+ # config) AND` \ `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND`
87
+ # \ `(error:*)` - Return operations where: * The operation's metadata type is
88
+ # CreateInstanceConfigMetadata. * The instance configuration name contains "
89
+ # custom-config". * The operation started before 2021-03-28T14:50:00Z. * The
90
+ # operation resulted in an error.
91
+ # @param [Fixnum] page_size
92
+ # Number of operations to be returned in the response. If 0 or less, defaults to
93
+ # the server's maximum allowed page size.
94
+ # @param [String] page_token
95
+ # If non-empty, `page_token` should contain a next_page_token from a previous
96
+ # ListInstanceConfigOperationsResponse to the same `parent` and with the same `
97
+ # filter`.
98
+ # @param [String] fields
99
+ # Selector specifying which fields to include in a partial response.
100
+ # @param [String] quota_user
101
+ # Available to use for quota purposes for server-side applications. Can be any
102
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
103
+ # @param [Google::Apis::RequestOptions] options
104
+ # Request-specific options
105
+ #
106
+ # @yield [result, err] Result & error if block supplied
107
+ # @yieldparam result [Google::Apis::SpannerV1::ListInstanceConfigOperationsResponse] parsed result object
108
+ # @yieldparam err [StandardError] error object if request failed
109
+ #
110
+ # @return [Google::Apis::SpannerV1::ListInstanceConfigOperationsResponse]
111
+ #
112
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
113
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
114
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
115
+ def list_project_single_instance_config_operations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
116
+ command = make_simple_command(:get, 'v1/{+parent}/instanceConfigOperations', options)
117
+ command.response_representation = Google::Apis::SpannerV1::ListInstanceConfigOperationsResponse::Representation
118
+ command.response_class = Google::Apis::SpannerV1::ListInstanceConfigOperationsResponse
119
+ command.params['parent'] = parent unless parent.nil?
120
+ command.query['filter'] = filter unless filter.nil?
121
+ command.query['pageSize'] = page_size unless page_size.nil?
122
+ command.query['pageToken'] = page_token unless page_token.nil?
123
+ command.query['fields'] = fields unless fields.nil?
124
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
125
+ execute_or_queue_command(command, &block)
126
+ end
127
+
128
+ # Creates an instance configuration and begins preparing it to be used. The
129
+ # returned long-running operation can be used to track the progress of preparing
130
+ # the new instance configuration. The instance configuration name is assigned by
131
+ # the caller. If the named instance configuration already exists, `
132
+ # CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the request
133
+ # returns: * The instance configuration is readable via the API, with all
134
+ # requested attributes. The instance configuration's reconciling field is set to
135
+ # true. Its state is `CREATING`. While the operation is pending: * Cancelling
136
+ # the operation renders the instance configuration immediately unreadable via
137
+ # the API. * Except for deleting the creating resource, all other attempts to
138
+ # modify the instance configuration are rejected. Upon completion of the
139
+ # returned operation: * Instances can be created using the instance
140
+ # configuration. * The instance configuration's reconciling field becomes false.
141
+ # Its state becomes `READY`. The returned long-running operation will have a
142
+ # name of the format `/operations/` and can be used to track creation of the
143
+ # instance configuration. The metadata field type is
144
+ # CreateInstanceConfigMetadata. The response field type is InstanceConfig, if
145
+ # successful. Authorization requires `spanner.instanceConfigs.create` permission
146
+ # on the resource parent.
147
+ # @param [String] parent
148
+ # Required. The name of the project in which to create the instance
149
+ # configuration. Values are of the form `projects/`.
150
+ # @param [Google::Apis::SpannerV1::CreateInstanceConfigRequest] create_instance_config_request_object
151
+ # @param [String] fields
152
+ # Selector specifying which fields to include in a partial response.
153
+ # @param [String] quota_user
154
+ # Available to use for quota purposes for server-side applications. Can be any
155
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
156
+ # @param [Google::Apis::RequestOptions] options
157
+ # Request-specific options
158
+ #
159
+ # @yield [result, err] Result & error if block supplied
160
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
161
+ # @yieldparam err [StandardError] error object if request failed
162
+ #
163
+ # @return [Google::Apis::SpannerV1::Operation]
164
+ #
165
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
166
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
167
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
168
+ def create_instance_config(parent, create_instance_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
169
+ command = make_simple_command(:post, 'v1/{+parent}/instanceConfigs', options)
170
+ command.request_representation = Google::Apis::SpannerV1::CreateInstanceConfigRequest::Representation
171
+ command.request_object = create_instance_config_request_object
172
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
173
+ command.response_class = Google::Apis::SpannerV1::Operation
174
+ command.params['parent'] = parent unless parent.nil?
175
+ command.query['fields'] = fields unless fields.nil?
176
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
177
+ execute_or_queue_command(command, &block)
178
+ end
179
+
180
+ # Deletes the instance configuration. Deletion is only allowed when no instances
181
+ # are using the configuration. If any instances are using the configuration,
182
+ # returns `FAILED_PRECONDITION`. Only user-managed configurations can be deleted.
183
+ # Authorization requires `spanner.instanceConfigs.delete` permission on the
184
+ # resource name.
185
+ # @param [String] name
186
+ # Required. The name of the instance configuration to be deleted. Values are of
187
+ # the form `projects//instanceConfigs/`
188
+ # @param [String] etag
189
+ # Used for optimistic concurrency control as a way to help prevent simultaneous
190
+ # deletes of an instance configuration from overwriting each other. If not empty,
191
+ # the API only deletes the instance configuration when the etag provided
192
+ # matches the current status of the requested instance configuration. Otherwise,
193
+ # deletes the instance configuration without checking the current status of the
194
+ # requested instance configuration.
195
+ # @param [Boolean] validate_only
196
+ # An option to validate, but not actually execute, a request, and provide the
197
+ # same response.
198
+ # @param [String] fields
199
+ # Selector specifying which fields to include in a partial response.
200
+ # @param [String] quota_user
201
+ # Available to use for quota purposes for server-side applications. Can be any
202
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
203
+ # @param [Google::Apis::RequestOptions] options
204
+ # Request-specific options
205
+ #
206
+ # @yield [result, err] Result & error if block supplied
207
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
208
+ # @yieldparam err [StandardError] error object if request failed
209
+ #
210
+ # @return [Google::Apis::SpannerV1::Empty]
211
+ #
212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
215
+ def delete_project_instance_config(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
216
+ command = make_simple_command(:delete, 'v1/{+name}', options)
217
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
218
+ command.response_class = Google::Apis::SpannerV1::Empty
219
+ command.params['name'] = name unless name.nil?
220
+ command.query['etag'] = etag unless etag.nil?
221
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
222
+ command.query['fields'] = fields unless fields.nil?
223
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
224
+ execute_or_queue_command(command, &block)
225
+ end
226
+
53
227
  # Gets information about a particular instance configuration.
54
228
  # @param [String] name
55
229
  # Required. The name of the requested instance configuration. Values are of the
@@ -81,7 +255,8 @@ module Google
81
255
  execute_or_queue_command(command, &block)
82
256
  end
83
257
 
84
- # Lists the supported instance configurations for a given project.
258
+ # Lists the supported instance configurations for a given project. Returns both
259
+ # Google-managed configurations and user-managed configurations.
85
260
  # @param [String] parent
86
261
  # Required. The name of the project for which a list of supported instance
87
262
  # configurations is requested. Values are of the form `projects/`.
@@ -120,14 +295,66 @@ module Google
120
295
  execute_or_queue_command(command, &block)
121
296
  end
122
297
 
298
+ # Updates an instance configuration. The returned long-running operation can be
299
+ # used to track the progress of updating the instance. If the named instance
300
+ # configuration does not exist, returns `NOT_FOUND`. Only user-managed
301
+ # configurations can be updated. Immediately after the request returns: * The
302
+ # instance configuration's reconciling field is set to true. While the operation
303
+ # is pending: * Cancelling the operation sets its metadata's cancel_time. The
304
+ # operation is guaranteed to succeed at undoing all changes, after which point
305
+ # it terminates with a `CANCELLED` status. * All other attempts to modify the
306
+ # instance configuration are rejected. * Reading the instance configuration via
307
+ # the API continues to give the pre-request values. Upon completion of the
308
+ # returned operation: * Creating instances using the instance configuration uses
309
+ # the new values. * The new values of the instance configuration are readable
310
+ # via the API. * The instance configuration's reconciling field becomes false.
311
+ # The returned long-running operation will have a name of the format `/
312
+ # operations/` and can be used to track the instance configuration modification.
313
+ # The metadata field type is UpdateInstanceConfigMetadata. The response field
314
+ # type is InstanceConfig, if successful. Authorization requires `spanner.
315
+ # instanceConfigs.update` permission on the resource name.
316
+ # @param [String] name
317
+ # A unique identifier for the instance configuration. Values are of the form `
318
+ # projects//instanceConfigs/a-z*`. User instance configuration must start with `
319
+ # custom-`.
320
+ # @param [Google::Apis::SpannerV1::UpdateInstanceConfigRequest] update_instance_config_request_object
321
+ # @param [String] fields
322
+ # Selector specifying which fields to include in a partial response.
323
+ # @param [String] quota_user
324
+ # Available to use for quota purposes for server-side applications. Can be any
325
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
326
+ # @param [Google::Apis::RequestOptions] options
327
+ # Request-specific options
328
+ #
329
+ # @yield [result, err] Result & error if block supplied
330
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
331
+ # @yieldparam err [StandardError] error object if request failed
332
+ #
333
+ # @return [Google::Apis::SpannerV1::Operation]
334
+ #
335
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
336
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
337
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
338
+ def patch_project_instance_config(name, update_instance_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
339
+ command = make_simple_command(:patch, 'v1/{+name}', options)
340
+ command.request_representation = Google::Apis::SpannerV1::UpdateInstanceConfigRequest::Representation
341
+ command.request_object = update_instance_config_request_object
342
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
343
+ command.response_class = Google::Apis::SpannerV1::Operation
344
+ command.params['name'] = name unless name.nil?
345
+ command.query['fields'] = fields unless fields.nil?
346
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
347
+ execute_or_queue_command(command, &block)
348
+ end
349
+
123
350
  # Starts asynchronous cancellation on a long-running operation. The server makes
124
351
  # a best effort to cancel the operation, but success is not guaranteed. If the
125
352
  # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
126
353
  # Clients can use Operations.GetOperation or other methods to check whether the
127
354
  # cancellation succeeded or whether the operation completed despite cancellation.
128
355
  # 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`.
356
+ # an operation with an Operation.error value with a google.rpc.Status.code of `1`
357
+ # , corresponding to `Code.CANCELLED`.
131
358
  # @param [String] name
132
359
  # The name of the operation resource to be cancelled.
133
360
  # @param [String] fields
@@ -222,13 +449,7 @@ module Google
222
449
  end
223
450
 
224
451
  # 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.
452
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
232
453
  # @param [String] name
233
454
  # The name of the operation's parent resource.
234
455
  # @param [String] filter
@@ -267,6 +488,147 @@ module Google
267
488
  execute_or_queue_command(command, &block)
268
489
  end
269
490
 
491
+ # Starts asynchronous cancellation on a long-running operation. The server makes
492
+ # a best effort to cancel the operation, but success is not guaranteed. If the
493
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
494
+ # Clients can use Operations.GetOperation or other methods to check whether the
495
+ # cancellation succeeded or whether the operation completed despite cancellation.
496
+ # On successful cancellation, the operation is not deleted; instead, it becomes
497
+ # an operation with an Operation.error value with a google.rpc.Status.code of `1`
498
+ # , corresponding to `Code.CANCELLED`.
499
+ # @param [String] name
500
+ # The name of the operation resource to be cancelled.
501
+ # @param [String] fields
502
+ # Selector specifying which fields to include in a partial response.
503
+ # @param [String] quota_user
504
+ # Available to use for quota purposes for server-side applications. Can be any
505
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
506
+ # @param [Google::Apis::RequestOptions] options
507
+ # Request-specific options
508
+ #
509
+ # @yield [result, err] Result & error if block supplied
510
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
511
+ # @yieldparam err [StandardError] error object if request failed
512
+ #
513
+ # @return [Google::Apis::SpannerV1::Empty]
514
+ #
515
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
516
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
517
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
518
+ def cancel_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil, &block)
519
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
520
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
521
+ command.response_class = Google::Apis::SpannerV1::Empty
522
+ command.params['name'] = name unless name.nil?
523
+ command.query['fields'] = fields unless fields.nil?
524
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
525
+ execute_or_queue_command(command, &block)
526
+ end
527
+
528
+ # Deletes a long-running operation. This method indicates that the client is no
529
+ # longer interested in the operation result. It does not cancel the operation.
530
+ # If the server doesn't support this method, it returns `google.rpc.Code.
531
+ # UNIMPLEMENTED`.
532
+ # @param [String] name
533
+ # The name of the operation resource to be deleted.
534
+ # @param [String] fields
535
+ # Selector specifying which fields to include in a partial response.
536
+ # @param [String] quota_user
537
+ # Available to use for quota purposes for server-side applications. Can be any
538
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
539
+ # @param [Google::Apis::RequestOptions] options
540
+ # Request-specific options
541
+ #
542
+ # @yield [result, err] Result & error if block supplied
543
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
544
+ # @yieldparam err [StandardError] error object if request failed
545
+ #
546
+ # @return [Google::Apis::SpannerV1::Empty]
547
+ #
548
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
549
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
550
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
551
+ def delete_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil, &block)
552
+ command = make_simple_command(:delete, 'v1/{+name}', options)
553
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
554
+ command.response_class = Google::Apis::SpannerV1::Empty
555
+ command.params['name'] = name unless name.nil?
556
+ command.query['fields'] = fields unless fields.nil?
557
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
558
+ execute_or_queue_command(command, &block)
559
+ end
560
+
561
+ # Gets the latest state of a long-running operation. Clients can use this method
562
+ # to poll the operation result at intervals as recommended by the API service.
563
+ # @param [String] name
564
+ # The name of the operation resource.
565
+ # @param [String] fields
566
+ # Selector specifying which fields to include in a partial response.
567
+ # @param [String] quota_user
568
+ # Available to use for quota purposes for server-side applications. Can be any
569
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
570
+ # @param [Google::Apis::RequestOptions] options
571
+ # Request-specific options
572
+ #
573
+ # @yield [result, err] Result & error if block supplied
574
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
575
+ # @yieldparam err [StandardError] error object if request failed
576
+ #
577
+ # @return [Google::Apis::SpannerV1::Operation]
578
+ #
579
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
580
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
581
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
582
+ def get_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil, &block)
583
+ command = make_simple_command(:get, 'v1/{+name}', options)
584
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
585
+ command.response_class = Google::Apis::SpannerV1::Operation
586
+ command.params['name'] = name unless name.nil?
587
+ command.query['fields'] = fields unless fields.nil?
588
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
589
+ execute_or_queue_command(command, &block)
590
+ end
591
+
592
+ # Lists operations that match the specified filter in the request. If the server
593
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
594
+ # @param [String] name
595
+ # The name of the operation's parent resource.
596
+ # @param [String] filter
597
+ # The standard list filter.
598
+ # @param [Fixnum] page_size
599
+ # The standard list page size.
600
+ # @param [String] page_token
601
+ # The standard list page token.
602
+ # @param [String] fields
603
+ # Selector specifying which fields to include in a partial response.
604
+ # @param [String] quota_user
605
+ # Available to use for quota purposes for server-side applications. Can be any
606
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
607
+ # @param [Google::Apis::RequestOptions] options
608
+ # Request-specific options
609
+ #
610
+ # @yield [result, err] Result & error if block supplied
611
+ # @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object
612
+ # @yieldparam err [StandardError] error object if request failed
613
+ #
614
+ # @return [Google::Apis::SpannerV1::ListOperationsResponse]
615
+ #
616
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
617
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
618
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
619
+ def list_project_instance_config_ssd_cach_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
620
+ command = make_simple_command(:get, 'v1/{+name}', options)
621
+ command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
622
+ command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
623
+ command.params['name'] = name unless name.nil?
624
+ command.query['filter'] = filter unless filter.nil?
625
+ command.query['pageSize'] = page_size unless page_size.nil?
626
+ command.query['pageToken'] = page_token unless page_token.nil?
627
+ command.query['fields'] = fields unless fields.nil?
628
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
629
+ execute_or_queue_command(command, &block)
630
+ end
631
+
270
632
  # Creates an instance and begins preparing it to begin serving. The returned
271
633
  # long-running operation can be used to track the progress of preparing the new
272
634
  # instance. The instance name is assigned by the caller. If the named instance
@@ -478,8 +840,69 @@ module Google
478
840
  execute_or_queue_command(command, &block)
479
841
  end
480
842
 
481
- # Updates an instance, and begins allocating or releasing resources as requested.
482
- # The returned long-running operation can be used to track the progress of
843
+ # Moves an instance to the target instance configuration. You can use the
844
+ # returned long-running operation to track the progress of moving the instance. `
845
+ # MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the
846
+ # following criteria: * Is undergoing a move to a different instance
847
+ # configuration * Has backups * Has an ongoing update * Contains any CMEK-
848
+ # enabled databases * Is a free trial instance While the operation is pending: *
849
+ # All other attempts to modify the instance, including changes to its compute
850
+ # capacity, are rejected. * The following database and backup admin operations
851
+ # are rejected: * `DatabaseAdmin.CreateDatabase` * `DatabaseAdmin.
852
+ # UpdateDatabaseDdl` (disabled if default_leader is specified in the request.) *
853
+ # `DatabaseAdmin.RestoreDatabase` * `DatabaseAdmin.CreateBackup` * `
854
+ # DatabaseAdmin.CopyBackup` * Both the source and target instance configurations
855
+ # are subject to hourly compute and storage charges. * The instance might
856
+ # experience higher read-write latencies and a higher transaction abort rate.
857
+ # However, moving an instance doesn't cause any downtime. The returned long-
858
+ # running operation has a name of the format `/operations/` and can be used to
859
+ # track the move instance operation. The metadata field type is
860
+ # MoveInstanceMetadata. The response field type is Instance, if successful.
861
+ # Cancelling the operation sets its metadata's cancel_time. Cancellation is not
862
+ # immediate because it involves moving any data previously moved to the target
863
+ # instance configuration back to the original instance configuration. You can
864
+ # use this operation to track the progress of the cancellation. Upon successful
865
+ # completion of the cancellation, the operation terminates with `CANCELLED`
866
+ # status. If not cancelled, upon completion of the returned operation: * The
867
+ # instance successfully moves to the target instance configuration. * You are
868
+ # billed for compute and storage in target instance configuration. Authorization
869
+ # requires the `spanner.instances.update` permission on the resource instance.
870
+ # For more details, see [Move an instance](https://cloud.google.com/spanner/docs/
871
+ # move-instance).
872
+ # @param [String] name
873
+ # Required. The instance to move. Values are of the form `projects//instances/`.
874
+ # @param [Google::Apis::SpannerV1::MoveInstanceRequest] move_instance_request_object
875
+ # @param [String] fields
876
+ # Selector specifying which fields to include in a partial response.
877
+ # @param [String] quota_user
878
+ # Available to use for quota purposes for server-side applications. Can be any
879
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
880
+ # @param [Google::Apis::RequestOptions] options
881
+ # Request-specific options
882
+ #
883
+ # @yield [result, err] Result & error if block supplied
884
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
885
+ # @yieldparam err [StandardError] error object if request failed
886
+ #
887
+ # @return [Google::Apis::SpannerV1::Operation]
888
+ #
889
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
890
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
891
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
892
+ def move_instance(name, move_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
893
+ command = make_simple_command(:post, 'v1/{+name}:move', options)
894
+ command.request_representation = Google::Apis::SpannerV1::MoveInstanceRequest::Representation
895
+ command.request_object = move_instance_request_object
896
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
897
+ command.response_class = Google::Apis::SpannerV1::Operation
898
+ command.params['name'] = name unless name.nil?
899
+ command.query['fields'] = fields unless fields.nil?
900
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
901
+ execute_or_queue_command(command, &block)
902
+ end
903
+
904
+ # Updates an instance, and begins allocating or releasing resources as requested.
905
+ # The returned long-running operation can be used to track the progress of
483
906
  # updating the instance. If the named instance does not exist, returns `
484
907
  # NOT_FOUND`. Immediately upon completion of this request: * For resource types
485
908
  # for which a decrease in the instance's allocation has been requested, billing
@@ -702,8 +1125,9 @@ module Google
702
1125
  # operations/` and can be used to track copying of the backup. The operation is
703
1126
  # associated with the destination backup. The metadata field type is
704
1127
  # 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.
1128
+ # Cancelling the returned operation will stop the copying and delete the
1129
+ # destination backup. Concurrent CopyBackup requests can run on the same source
1130
+ # backup.
707
1131
  # @param [String] parent
708
1132
  # Required. The name of the destination instance that will contain the backup
709
1133
  # copy. Values are of the form: `projects//instances/`.
@@ -760,6 +1184,18 @@ module Google
760
1184
  # Optional. The Cloud KMS key that will be used to protect the backup. This
761
1185
  # field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`.
762
1186
  # Values are of the form `projects//locations//keyRings//cryptoKeys/`.
1187
+ # @param [Array<String>, String] encryption_config_kms_key_names
1188
+ # Optional. Specifies the KMS configuration for the one or more keys used to
1189
+ # protect the backup. Values are of the form `projects//locations//keyRings//
1190
+ # cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all
1191
+ # regions of the backup's instance configuration. Some examples: * For regional (
1192
+ # single-region) instance configurations, specify a regional location KMS key. *
1193
+ # For multi-region instance configurations of type `GOOGLE_MANAGED`, either
1194
+ # specify a multi-region location KMS key or multiple regional location KMS keys
1195
+ # that cover all regions in the instance configuration. * For an instance
1196
+ # configuration of type `USER_MANAGED`, specify only regional location KMS keys
1197
+ # to cover each region in the instance configuration. Multi-region location KMS
1198
+ # keys aren't supported for `USER_MANAGED` type instance configurations.
763
1199
  # @param [String] fields
764
1200
  # Selector specifying which fields to include in a partial response.
765
1201
  # @param [String] quota_user
@@ -777,7 +1213,7 @@ module Google
777
1213
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
778
1214
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
779
1215
  # @raise [Google::Apis::AuthorizationError] Authorization is required
780
- def create_project_instance_backup(parent, backup_object = nil, backup_id: nil, encryption_config_encryption_type: nil, encryption_config_kms_key_name: nil, fields: nil, quota_user: nil, options: nil, &block)
1216
+ def create_project_instance_backup(parent, backup_object = nil, backup_id: nil, encryption_config_encryption_type: nil, encryption_config_kms_key_name: nil, encryption_config_kms_key_names: nil, fields: nil, quota_user: nil, options: nil, &block)
781
1217
  command = make_simple_command(:post, 'v1/{+parent}/backups', options)
782
1218
  command.request_representation = Google::Apis::SpannerV1::Backup::Representation
783
1219
  command.request_object = backup_object
@@ -787,6 +1223,7 @@ module Google
787
1223
  command.query['backupId'] = backup_id unless backup_id.nil?
788
1224
  command.query['encryptionConfig.encryptionType'] = encryption_config_encryption_type unless encryption_config_encryption_type.nil?
789
1225
  command.query['encryptionConfig.kmsKeyName'] = encryption_config_kms_key_name unless encryption_config_kms_key_name.nil?
1226
+ command.query['encryptionConfig.kmsKeyNames'] = encryption_config_kms_key_names unless encryption_config_kms_key_names.nil?
790
1227
  command.query['fields'] = fields unless fields.nil?
791
1228
  command.query['quotaUser'] = quota_user unless quota_user.nil?
792
1229
  execute_or_queue_command(command, &block)
@@ -858,7 +1295,8 @@ module Google
858
1295
  # empty policy if a database or backup exists but does not have a policy set.
859
1296
  # Authorization requires `spanner.databases.getIamPolicy` permission on resource.
860
1297
  # For backups, authorization requires `spanner.backups.getIamPolicy` permission
861
- # on resource.
1298
+ # on resource. For backup schedules, authorization requires `spanner.
1299
+ # backupSchedules.getIamPolicy` permission on resource.
862
1300
  # @param [String] resource
863
1301
  # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
864
1302
  # The format is `projects//instances/` for instance resources and `projects//
@@ -908,17 +1346,19 @@ module Google
908
1346
  # create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
909
1347
  # expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
910
1348
  # version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
911
- # size_bytes` You can combine multiple expressions by enclosing each expression
912
- # in parentheses. By default, expressions are combined with AND logic, but you
913
- # can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `
914
- # name:Howl` - The backup's name contains the string "howl". * `database:prod` -
915
- # The database's name contains the string "prod". * `state:CREATING` - The
916
- # backup is pending creation. * `state:READY` - The backup is fully created and
917
- # ready for use. * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` -
918
- # The backup name contains the string "howl" and `create_time` of the backup is
919
- # before 2018-03-28T14:50:00Z. * `expire_time < \"2018-03-28T14:50:00Z\"` - The
920
- # backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes >
921
- # 10000000000` - The backup's size is greater than 10GB
1349
+ # size_bytes` * `backup_schedules` You can combine multiple expressions by
1350
+ # enclosing each expression in parentheses. By default, expressions are combined
1351
+ # with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here
1352
+ # are a few examples: * `name:Howl` - The backup's name contains the string "
1353
+ # howl". * `database:prod` - The database's name contains the string "prod". * `
1354
+ # state:CREATING` - The backup is pending creation. * `state:READY` - The backup
1355
+ # is fully created and ready for use. * `(name:howl) AND (create_time < \"2018-
1356
+ # 03-28T14:50:00Z\")` - The backup name contains the string "howl" and `
1357
+ # create_time` of the backup is before 2018-03-28T14:50:00Z. * `expire_time < \"
1358
+ # 2018-03-28T14:50:00Z\"` - The backup `expire_time` is before 2018-03-28T14:50:
1359
+ # 00Z. * `size_bytes > 10000000000` - The backup's size is greater than 10GB * `
1360
+ # backup_schedules:daily` - The backup is created from a schedule with "daily"
1361
+ # in its name.
922
1362
  # @param [Fixnum] page_size
923
1363
  # Number of backups to be returned in the response. If 0 or less, defaults to
924
1364
  # the server's maximum allowed page size.
@@ -1004,7 +1444,8 @@ module Google
1004
1444
  # Sets the access control policy on a database or backup resource. Replaces any
1005
1445
  # existing policy. Authorization requires `spanner.databases.setIamPolicy`
1006
1446
  # permission on resource. For backups, authorization requires `spanner.backups.
1007
- # setIamPolicy` permission on resource.
1447
+ # setIamPolicy` permission on resource. For backup schedules, authorization
1448
+ # requires `spanner.backupSchedules.setIamPolicy` permission on resource.
1008
1449
  # @param [String] resource
1009
1450
  # REQUIRED: The Cloud Spanner resource for which the policy is being set. The
1010
1451
  # format is `projects//instances/` for instance resources and `projects//
@@ -1045,7 +1486,9 @@ module Google
1045
1486
  # permission on the containing Cloud Spanner instance. Otherwise returns an
1046
1487
  # empty set of permissions. Calling this method on a backup that does not exist
1047
1488
  # will result in a NOT_FOUND error if the user has `spanner.backups.list`
1048
- # permission on the containing instance.
1489
+ # permission on the containing instance. Calling this method on a backup
1490
+ # schedule that does not exist will result in a NOT_FOUND error if the user has `
1491
+ # spanner.backupSchedules.list` permission on the containing database.
1049
1492
  # @param [String] resource
1050
1493
  # REQUIRED: The Cloud Spanner resource for which permissions are being tested.
1051
1494
  # The format is `projects//instances/` for instance resources and `projects//
@@ -1086,8 +1529,8 @@ module Google
1086
1529
  # Clients can use Operations.GetOperation or other methods to check whether the
1087
1530
  # cancellation succeeded or whether the operation completed despite cancellation.
1088
1531
  # On successful cancellation, the operation is not deleted; instead, it becomes
1089
- # an operation with an Operation.error value with a google.rpc.Status.code of 1,
1090
- # corresponding to `Code.CANCELLED`.
1532
+ # an operation with an Operation.error value with a google.rpc.Status.code of `1`
1533
+ # , corresponding to `Code.CANCELLED`.
1091
1534
  # @param [String] name
1092
1535
  # The name of the operation resource to be cancelled.
1093
1536
  # @param [String] fields
@@ -1182,13 +1625,7 @@ module Google
1182
1625
  end
1183
1626
 
1184
1627
  # Lists operations that match the specified filter in the request. If the server
1185
- # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
1186
- # binding allows API services to override the binding to use different resource
1187
- # name schemes, such as `users/*/operations`. To override the binding, API
1188
- # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
1189
- # service configuration. For backwards compatibility, the default name includes
1190
- # the operations collection id, however overriding users must ensure the name
1191
- # binding is the parent resource, without the operations collection id.
1628
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
1192
1629
  # @param [String] name
1193
1630
  # The name of the operation's parent resource.
1194
1631
  # @param [String] filter
@@ -1241,7 +1678,7 @@ module Google
1241
1678
  # filtering. The value must be a string, a number, or a boolean. The comparison
1242
1679
  # operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is
1243
1680
  # the contains operator. Filter rules are not case sensitive. The following
1244
- # fields in the Operation are eligible for filtering: * `name` - The name of the
1681
+ # fields in the operation are eligible for filtering: * `name` - The name of the
1245
1682
  # long-running operation * `done` - False if the operation is in progress, else
1246
1683
  # true. * `metadata.@type` - the type of metadata. For example, the type string
1247
1684
  # for RestoreDatabaseMetadata is `type.googleapis.com/google.spanner.admin.
@@ -1297,7 +1734,47 @@ module Google
1297
1734
  execute_or_queue_command(command, &block)
1298
1735
  end
1299
1736
 
1300
- # Creates a new Cloud Spanner database and starts to prepare it for serving. The
1737
+ # `ChangeQuorum` is strictly restricted to databases that use dual-region
1738
+ # instance configurations. Initiates a background operation to change the quorum
1739
+ # of a database from dual-region mode to single-region mode or vice versa. The
1740
+ # returned long-running operation has a name of the format `projects//instances//
1741
+ # databases//operations/` and can be used to track execution of the `
1742
+ # ChangeQuorum`. The metadata field type is ChangeQuorumMetadata. Authorization
1743
+ # requires `spanner.databases.changequorum` permission on the resource database.
1744
+ # @param [String] name
1745
+ # Required. Name of the database in which to apply `ChangeQuorum`. Values are of
1746
+ # the form `projects//instances//databases/`.
1747
+ # @param [Google::Apis::SpannerV1::ChangeQuorumRequest] change_quorum_request_object
1748
+ # @param [String] fields
1749
+ # Selector specifying which fields to include in a partial response.
1750
+ # @param [String] quota_user
1751
+ # Available to use for quota purposes for server-side applications. Can be any
1752
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1753
+ # @param [Google::Apis::RequestOptions] options
1754
+ # Request-specific options
1755
+ #
1756
+ # @yield [result, err] Result & error if block supplied
1757
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
1758
+ # @yieldparam err [StandardError] error object if request failed
1759
+ #
1760
+ # @return [Google::Apis::SpannerV1::Operation]
1761
+ #
1762
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1763
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1764
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1765
+ def changequorum_project_instance_database(name, change_quorum_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1766
+ command = make_simple_command(:post, 'v1/{+name}:changequorum', options)
1767
+ command.request_representation = Google::Apis::SpannerV1::ChangeQuorumRequest::Representation
1768
+ command.request_object = change_quorum_request_object
1769
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
1770
+ command.response_class = Google::Apis::SpannerV1::Operation
1771
+ command.params['name'] = name unless name.nil?
1772
+ command.query['fields'] = fields unless fields.nil?
1773
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1774
+ execute_or_queue_command(command, &block)
1775
+ end
1776
+
1777
+ # Creates a new Spanner database and starts to prepare it for serving. The
1301
1778
  # returned long-running operation will have a name of the format `/operations/`
1302
1779
  # and can be used to track preparation of the database. The metadata field type
1303
1780
  # is CreateDatabaseMetadata. The response field type is Database, if successful.
@@ -1435,7 +1912,8 @@ module Google
1435
1912
  # empty policy if a database or backup exists but does not have a policy set.
1436
1913
  # Authorization requires `spanner.databases.getIamPolicy` permission on resource.
1437
1914
  # For backups, authorization requires `spanner.backups.getIamPolicy` permission
1438
- # on resource.
1915
+ # on resource. For backup schedules, authorization requires `spanner.
1916
+ # backupSchedules.getIamPolicy` permission on resource.
1439
1917
  # @param [String] resource
1440
1918
  # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
1441
1919
  # The format is `projects//instances/` for instance resources and `projects//
@@ -1554,6 +2032,60 @@ module Google
1554
2032
  execute_or_queue_command(command, &block)
1555
2033
  end
1556
2034
 
2035
+ # Updates a Cloud Spanner database. The returned long-running operation can be
2036
+ # used to track the progress of updating the database. If the named database
2037
+ # does not exist, returns `NOT_FOUND`. While the operation is pending: * The
2038
+ # database's reconciling field is set to true. * Cancelling the operation is
2039
+ # best-effort. If the cancellation succeeds, the operation metadata's
2040
+ # cancel_time is set, the updates are reverted, and the operation terminates
2041
+ # with a `CANCELLED` status. * New UpdateDatabase requests will return a `
2042
+ # FAILED_PRECONDITION` error until the pending operation is done (returns
2043
+ # successfully or with error). * Reading the database via the API continues to
2044
+ # give the pre-request values. Upon completion of the returned operation: * The
2045
+ # new values are in effect and readable via the API. * The database's
2046
+ # reconciling field becomes false. The returned long-running operation will have
2047
+ # a name of the format `projects//instances//databases//operations/` and can be
2048
+ # used to track the database modification. The metadata field type is
2049
+ # UpdateDatabaseMetadata. The response field type is Database, if successful.
2050
+ # @param [String] name
2051
+ # Required. The name of the database. Values are of the form `projects//
2052
+ # instances//databases/`, where `` is as specified in the `CREATE DATABASE`
2053
+ # statement. This name can be passed to other API methods to identify the
2054
+ # database.
2055
+ # @param [Google::Apis::SpannerV1::Database] database_object
2056
+ # @param [String] update_mask
2057
+ # Required. The list of fields to update. Currently, only `
2058
+ # enable_drop_protection` field can be updated.
2059
+ # @param [String] fields
2060
+ # Selector specifying which fields to include in a partial response.
2061
+ # @param [String] quota_user
2062
+ # Available to use for quota purposes for server-side applications. Can be any
2063
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2064
+ # @param [Google::Apis::RequestOptions] options
2065
+ # Request-specific options
2066
+ #
2067
+ # @yield [result, err] Result & error if block supplied
2068
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
2069
+ # @yieldparam err [StandardError] error object if request failed
2070
+ #
2071
+ # @return [Google::Apis::SpannerV1::Operation]
2072
+ #
2073
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2074
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2075
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2076
+ def patch_project_instance_database(name, database_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2077
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2078
+ command.request_representation = Google::Apis::SpannerV1::Database::Representation
2079
+ command.request_object = database_object
2080
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
2081
+ command.response_class = Google::Apis::SpannerV1::Operation
2082
+ command.params['name'] = name unless name.nil?
2083
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2084
+ command.query['fields'] = fields unless fields.nil?
2085
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2086
+ execute_or_queue_command(command, &block)
2087
+ end
2088
+
1557
2089
  # Create a new database by restoring from a completed backup. The new database
1558
2090
  # must be in the same project and in an instance with the same instance
1559
2091
  # configuration as the instance containing the backup. The returned database
@@ -1604,7 +2136,8 @@ module Google
1604
2136
  # Sets the access control policy on a database or backup resource. Replaces any
1605
2137
  # existing policy. Authorization requires `spanner.databases.setIamPolicy`
1606
2138
  # permission on resource. For backups, authorization requires `spanner.backups.
1607
- # setIamPolicy` permission on resource.
2139
+ # setIamPolicy` permission on resource. For backup schedules, authorization
2140
+ # requires `spanner.backupSchedules.setIamPolicy` permission on resource.
1608
2141
  # @param [String] resource
1609
2142
  # REQUIRED: The Cloud Spanner resource for which the policy is being set. The
1610
2143
  # format is `projects//instances/` for instance resources and `projects//
@@ -1645,7 +2178,9 @@ module Google
1645
2178
  # permission on the containing Cloud Spanner instance. Otherwise returns an
1646
2179
  # empty set of permissions. Calling this method on a backup that does not exist
1647
2180
  # will result in a NOT_FOUND error if the user has `spanner.backups.list`
1648
- # permission on the containing instance.
2181
+ # permission on the containing instance. Calling this method on a backup
2182
+ # schedule that does not exist will result in a NOT_FOUND error if the user has `
2183
+ # spanner.backupSchedules.list` permission on the containing database.
1649
2184
  # @param [String] resource
1650
2185
  # REQUIRED: The Cloud Spanner resource for which permissions are being tested.
1651
2186
  # The format is `projects//instances/` for instance resources and `projects//
@@ -1717,16 +2252,14 @@ module Google
1717
2252
  execute_or_queue_command(command, &block)
1718
2253
  end
1719
2254
 
1720
- # Lists Cloud Spanner database roles.
2255
+ # Creates a new backup schedule.
1721
2256
  # @param [String] parent
1722
- # Required. The database whose roles should be listed. Values are of the form `
1723
- # projects//instances//databases/`.
1724
- # @param [Fixnum] page_size
1725
- # Number of database roles to be returned in the response. If 0 or less,
1726
- # defaults to the server's maximum allowed page size.
1727
- # @param [String] page_token
1728
- # If non-empty, `page_token` should contain a next_page_token from a previous
1729
- # ListDatabaseRolesResponse.
2257
+ # Required. The name of the database that this backup schedule applies to.
2258
+ # @param [Google::Apis::SpannerV1::BackupSchedule] backup_schedule_object
2259
+ # @param [String] backup_schedule_id
2260
+ # Required. The Id to use for the backup schedule. The `backup_schedule_id`
2261
+ # appended to `parent` forms the full backup schedule name of the form `projects/
2262
+ # /instances//databases//backupSchedules/`.
1730
2263
  # @param [String] fields
1731
2264
  # Selector specifying which fields to include in a partial response.
1732
2265
  # @param [String] quota_user
@@ -1736,77 +2269,31 @@ module Google
1736
2269
  # Request-specific options
1737
2270
  #
1738
2271
  # @yield [result, err] Result & error if block supplied
1739
- # @yieldparam result [Google::Apis::SpannerV1::ListDatabaseRolesResponse] parsed result object
2272
+ # @yieldparam result [Google::Apis::SpannerV1::BackupSchedule] parsed result object
1740
2273
  # @yieldparam err [StandardError] error object if request failed
1741
2274
  #
1742
- # @return [Google::Apis::SpannerV1::ListDatabaseRolesResponse]
2275
+ # @return [Google::Apis::SpannerV1::BackupSchedule]
1743
2276
  #
1744
2277
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1745
2278
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1746
2279
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1747
- def list_project_instance_database_database_roles(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1748
- command = make_simple_command(:get, 'v1/{+parent}/databaseRoles', options)
1749
- command.response_representation = Google::Apis::SpannerV1::ListDatabaseRolesResponse::Representation
1750
- command.response_class = Google::Apis::SpannerV1::ListDatabaseRolesResponse
2280
+ def create_project_instance_database_backup_schedule(parent, backup_schedule_object = nil, backup_schedule_id: nil, fields: nil, quota_user: nil, options: nil, &block)
2281
+ command = make_simple_command(:post, 'v1/{+parent}/backupSchedules', options)
2282
+ command.request_representation = Google::Apis::SpannerV1::BackupSchedule::Representation
2283
+ command.request_object = backup_schedule_object
2284
+ command.response_representation = Google::Apis::SpannerV1::BackupSchedule::Representation
2285
+ command.response_class = Google::Apis::SpannerV1::BackupSchedule
1751
2286
  command.params['parent'] = parent unless parent.nil?
1752
- command.query['pageSize'] = page_size unless page_size.nil?
1753
- command.query['pageToken'] = page_token unless page_token.nil?
1754
- command.query['fields'] = fields unless fields.nil?
1755
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1756
- execute_or_queue_command(command, &block)
1757
- end
1758
-
1759
- # Returns permissions that the caller has on the specified database or backup
1760
- # resource. Attempting this RPC on a non-existent Cloud Spanner database will
1761
- # result in a NOT_FOUND error if the user has `spanner.databases.list`
1762
- # permission on the containing Cloud Spanner instance. Otherwise returns an
1763
- # empty set of permissions. Calling this method on a backup that does not exist
1764
- # will result in a NOT_FOUND error if the user has `spanner.backups.list`
1765
- # permission on the containing instance.
1766
- # @param [String] resource
1767
- # REQUIRED: The Cloud Spanner resource for which permissions are being tested.
1768
- # The format is `projects//instances/` for instance resources and `projects//
1769
- # instances//databases/` for database resources.
1770
- # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1771
- # @param [String] fields
1772
- # Selector specifying which fields to include in a partial response.
1773
- # @param [String] quota_user
1774
- # Available to use for quota purposes for server-side applications. Can be any
1775
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1776
- # @param [Google::Apis::RequestOptions] options
1777
- # Request-specific options
1778
- #
1779
- # @yield [result, err] Result & error if block supplied
1780
- # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object
1781
- # @yieldparam err [StandardError] error object if request failed
1782
- #
1783
- # @return [Google::Apis::SpannerV1::TestIamPermissionsResponse]
1784
- #
1785
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1786
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1787
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1788
- def test_database_role_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1789
- command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
1790
- command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
1791
- command.request_object = test_iam_permissions_request_object
1792
- command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
1793
- command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
1794
- command.params['resource'] = resource unless resource.nil?
2287
+ command.query['backupScheduleId'] = backup_schedule_id unless backup_schedule_id.nil?
1795
2288
  command.query['fields'] = fields unless fields.nil?
1796
2289
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1797
2290
  execute_or_queue_command(command, &block)
1798
2291
  end
1799
2292
 
1800
- # Starts asynchronous cancellation on a long-running operation. The server makes
1801
- # a best effort to cancel the operation, but success is not guaranteed. If the
1802
- # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1803
- # Clients can use Operations.GetOperation or other methods to check whether the
1804
- # cancellation succeeded or whether the operation completed despite cancellation.
1805
- # On successful cancellation, the operation is not deleted; instead, it becomes
1806
- # an operation with an Operation.error value with a google.rpc.Status.code of 1,
1807
- # corresponding to `Code.CANCELLED`.
2293
+ # Deletes a backup schedule.
1808
2294
  # @param [String] name
1809
- # The name of the operation resource to be cancelled.
2295
+ # Required. The name of the schedule to delete. Values are of the form `projects/
2296
+ # /instances//databases//backupSchedules/`.
1810
2297
  # @param [String] fields
1811
2298
  # Selector specifying which fields to include in a partial response.
1812
2299
  # @param [String] quota_user
@@ -1824,8 +2311,8 @@ module Google
1824
2311
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1825
2312
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1826
2313
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1827
- def cancel_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1828
- command = make_simple_command(:post, 'v1/{+name}:cancel', options)
2314
+ def delete_project_instance_database_backup_schedule(name, fields: nil, quota_user: nil, options: nil, &block)
2315
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1829
2316
  command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1830
2317
  command.response_class = Google::Apis::SpannerV1::Empty
1831
2318
  command.params['name'] = name unless name.nil?
@@ -1834,12 +2321,10 @@ module Google
1834
2321
  execute_or_queue_command(command, &block)
1835
2322
  end
1836
2323
 
1837
- # Deletes a long-running operation. This method indicates that the client is no
1838
- # longer interested in the operation result. It does not cancel the operation.
1839
- # If the server doesn't support this method, it returns `google.rpc.Code.
1840
- # UNIMPLEMENTED`.
2324
+ # Gets backup schedule for the input schedule name.
1841
2325
  # @param [String] name
1842
- # The name of the operation resource to be deleted.
2326
+ # Required. The name of the schedule to retrieve. Values are of the form `
2327
+ # projects//instances//databases//backupSchedules/`.
1843
2328
  # @param [String] fields
1844
2329
  # Selector specifying which fields to include in a partial response.
1845
2330
  # @param [String] quota_user
@@ -1849,28 +2334,35 @@ module Google
1849
2334
  # Request-specific options
1850
2335
  #
1851
2336
  # @yield [result, err] Result & error if block supplied
1852
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
2337
+ # @yieldparam result [Google::Apis::SpannerV1::BackupSchedule] parsed result object
1853
2338
  # @yieldparam err [StandardError] error object if request failed
1854
2339
  #
1855
- # @return [Google::Apis::SpannerV1::Empty]
2340
+ # @return [Google::Apis::SpannerV1::BackupSchedule]
1856
2341
  #
1857
2342
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1858
2343
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1859
2344
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1860
- def delete_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1861
- command = make_simple_command(:delete, 'v1/{+name}', options)
1862
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1863
- command.response_class = Google::Apis::SpannerV1::Empty
2345
+ def get_project_instance_database_backup_schedule(name, fields: nil, quota_user: nil, options: nil, &block)
2346
+ command = make_simple_command(:get, 'v1/{+name}', options)
2347
+ command.response_representation = Google::Apis::SpannerV1::BackupSchedule::Representation
2348
+ command.response_class = Google::Apis::SpannerV1::BackupSchedule
1864
2349
  command.params['name'] = name unless name.nil?
1865
2350
  command.query['fields'] = fields unless fields.nil?
1866
2351
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1867
2352
  execute_or_queue_command(command, &block)
1868
2353
  end
1869
2354
 
1870
- # Gets the latest state of a long-running operation. Clients can use this method
1871
- # to poll the operation result at intervals as recommended by the API service.
1872
- # @param [String] name
1873
- # The name of the operation resource.
2355
+ # Gets the access control policy for a database or backup resource. Returns an
2356
+ # empty policy if a database or backup exists but does not have a policy set.
2357
+ # Authorization requires `spanner.databases.getIamPolicy` permission on resource.
2358
+ # For backups, authorization requires `spanner.backups.getIamPolicy` permission
2359
+ # on resource. For backup schedules, authorization requires `spanner.
2360
+ # backupSchedules.getIamPolicy` permission on resource.
2361
+ # @param [String] resource
2362
+ # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
2363
+ # The format is `projects//instances/` for instance resources and `projects//
2364
+ # instances//databases/` for database resources.
2365
+ # @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object
1874
2366
  # @param [String] fields
1875
2367
  # Selector specifying which fields to include in a partial response.
1876
2368
  # @param [String] quota_user
@@ -1880,40 +2372,36 @@ module Google
1880
2372
  # Request-specific options
1881
2373
  #
1882
2374
  # @yield [result, err] Result & error if block supplied
1883
- # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
2375
+ # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
1884
2376
  # @yieldparam err [StandardError] error object if request failed
1885
2377
  #
1886
- # @return [Google::Apis::SpannerV1::Operation]
2378
+ # @return [Google::Apis::SpannerV1::Policy]
1887
2379
  #
1888
2380
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1889
2381
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1890
2382
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1891
- def get_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1892
- command = make_simple_command(:get, 'v1/{+name}', options)
1893
- command.response_representation = Google::Apis::SpannerV1::Operation::Representation
1894
- command.response_class = Google::Apis::SpannerV1::Operation
1895
- command.params['name'] = name unless name.nil?
2383
+ def get_backup_schedule_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2384
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
2385
+ command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation
2386
+ command.request_object = get_iam_policy_request_object
2387
+ command.response_representation = Google::Apis::SpannerV1::Policy::Representation
2388
+ command.response_class = Google::Apis::SpannerV1::Policy
2389
+ command.params['resource'] = resource unless resource.nil?
1896
2390
  command.query['fields'] = fields unless fields.nil?
1897
2391
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1898
2392
  execute_or_queue_command(command, &block)
1899
2393
  end
1900
2394
 
1901
- # Lists operations that match the specified filter in the request. If the server
1902
- # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
1903
- # binding allows API services to override the binding to use different resource
1904
- # name schemes, such as `users/*/operations`. To override the binding, API
1905
- # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
1906
- # service configuration. For backwards compatibility, the default name includes
1907
- # the operations collection id, however overriding users must ensure the name
1908
- # binding is the parent resource, without the operations collection id.
1909
- # @param [String] name
1910
- # The name of the operation's parent resource.
1911
- # @param [String] filter
1912
- # The standard list filter.
2395
+ # Lists all the backup schedules for the database.
2396
+ # @param [String] parent
2397
+ # Required. Database is the parent resource whose backup schedules should be
2398
+ # listed. Values are of the form projects//instances//databases/
1913
2399
  # @param [Fixnum] page_size
1914
- # The standard list page size.
2400
+ # Optional. Number of backup schedules to be returned in the response. If 0 or
2401
+ # less, defaults to the server's maximum allowed page size.
1915
2402
  # @param [String] page_token
1916
- # The standard list page token.
2403
+ # Optional. If non-empty, `page_token` should contain a next_page_token from a
2404
+ # previous ListBackupSchedulesResponse to the same `parent`.
1917
2405
  # @param [String] fields
1918
2406
  # Selector specifying which fields to include in a partial response.
1919
2407
  # @param [String] quota_user
@@ -1923,20 +2411,19 @@ module Google
1923
2411
  # Request-specific options
1924
2412
  #
1925
2413
  # @yield [result, err] Result & error if block supplied
1926
- # @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object
2414
+ # @yieldparam result [Google::Apis::SpannerV1::ListBackupSchedulesResponse] parsed result object
1927
2415
  # @yieldparam err [StandardError] error object if request failed
1928
2416
  #
1929
- # @return [Google::Apis::SpannerV1::ListOperationsResponse]
2417
+ # @return [Google::Apis::SpannerV1::ListBackupSchedulesResponse]
1930
2418
  #
1931
2419
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1932
2420
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1933
2421
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1934
- def list_project_instance_database_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1935
- command = make_simple_command(:get, 'v1/{+name}', options)
1936
- command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
1937
- command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
1938
- command.params['name'] = name unless name.nil?
1939
- command.query['filter'] = filter unless filter.nil?
2422
+ def list_project_instance_database_backup_schedules(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2423
+ command = make_simple_command(:get, 'v1/{+parent}/backupSchedules', options)
2424
+ command.response_representation = Google::Apis::SpannerV1::ListBackupSchedulesResponse::Representation
2425
+ command.response_class = Google::Apis::SpannerV1::ListBackupSchedulesResponse
2426
+ command.params['parent'] = parent unless parent.nil?
1940
2427
  command.query['pageSize'] = page_size unless page_size.nil?
1941
2428
  command.query['pageToken'] = page_token unless page_token.nil?
1942
2429
  command.query['fields'] = fields unless fields.nil?
@@ -1944,12 +2431,19 @@ module Google
1944
2431
  execute_or_queue_command(command, &block)
1945
2432
  end
1946
2433
 
1947
- # Creates multiple new sessions. This API can be used to initialize a session
1948
- # cache on the clients. See https://goo.gl/TgSFN2 for best practices on session
1949
- # cache management.
1950
- # @param [String] database
1951
- # Required. The database in which the new sessions are created.
1952
- # @param [Google::Apis::SpannerV1::BatchCreateSessionsRequest] batch_create_sessions_request_object
2434
+ # Updates a backup schedule.
2435
+ # @param [String] name
2436
+ # Identifier. Output only for the CreateBackupSchedule operation. Required for
2437
+ # the UpdateBackupSchedule operation. A globally unique identifier for the
2438
+ # backup schedule which cannot be changed. Values are of the form `projects//
2439
+ # instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the
2440
+ # name must be between 2 and 60 characters in length.
2441
+ # @param [Google::Apis::SpannerV1::BackupSchedule] backup_schedule_object
2442
+ # @param [String] update_mask
2443
+ # Required. A mask specifying which fields in the BackupSchedule resource should
2444
+ # be updated. This mask is relative to the BackupSchedule resource, not to the
2445
+ # request message. The field mask must always be specified; this prevents any
2446
+ # future fields from being erased accidentally.
1953
2447
  # @param [String] fields
1954
2448
  # Selector specifying which fields to include in a partial response.
1955
2449
  # @param [String] quota_user
@@ -1959,31 +2453,37 @@ module Google
1959
2453
  # Request-specific options
1960
2454
  #
1961
2455
  # @yield [result, err] Result & error if block supplied
1962
- # @yieldparam result [Google::Apis::SpannerV1::BatchCreateSessionsResponse] parsed result object
2456
+ # @yieldparam result [Google::Apis::SpannerV1::BackupSchedule] parsed result object
1963
2457
  # @yieldparam err [StandardError] error object if request failed
1964
2458
  #
1965
- # @return [Google::Apis::SpannerV1::BatchCreateSessionsResponse]
2459
+ # @return [Google::Apis::SpannerV1::BackupSchedule]
1966
2460
  #
1967
2461
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1968
2462
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1969
2463
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1970
- def batch_create_sessions(database, batch_create_sessions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1971
- command = make_simple_command(:post, 'v1/{+database}/sessions:batchCreate', options)
1972
- command.request_representation = Google::Apis::SpannerV1::BatchCreateSessionsRequest::Representation
1973
- command.request_object = batch_create_sessions_request_object
1974
- command.response_representation = Google::Apis::SpannerV1::BatchCreateSessionsResponse::Representation
1975
- command.response_class = Google::Apis::SpannerV1::BatchCreateSessionsResponse
1976
- command.params['database'] = database unless database.nil?
2464
+ def patch_project_instance_database_backup_schedule(name, backup_schedule_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2465
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2466
+ command.request_representation = Google::Apis::SpannerV1::BackupSchedule::Representation
2467
+ command.request_object = backup_schedule_object
2468
+ command.response_representation = Google::Apis::SpannerV1::BackupSchedule::Representation
2469
+ command.response_class = Google::Apis::SpannerV1::BackupSchedule
2470
+ command.params['name'] = name unless name.nil?
2471
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1977
2472
  command.query['fields'] = fields unless fields.nil?
1978
2473
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1979
2474
  execute_or_queue_command(command, &block)
1980
2475
  end
1981
2476
 
1982
- # Begins a new transaction. This step can often be skipped: Read, ExecuteSql and
1983
- # Commit can begin a new transaction as a side-effect.
1984
- # @param [String] session
1985
- # Required. The session in which the transaction runs.
1986
- # @param [Google::Apis::SpannerV1::BeginTransactionRequest] begin_transaction_request_object
2477
+ # Sets the access control policy on a database or backup resource. Replaces any
2478
+ # existing policy. Authorization requires `spanner.databases.setIamPolicy`
2479
+ # permission on resource. For backups, authorization requires `spanner.backups.
2480
+ # setIamPolicy` permission on resource. For backup schedules, authorization
2481
+ # requires `spanner.backupSchedules.setIamPolicy` permission on resource.
2482
+ # @param [String] resource
2483
+ # REQUIRED: The Cloud Spanner resource for which the policy is being set. The
2484
+ # format is `projects//instances/` for instance resources and `projects//
2485
+ # instances//databases/` for databases resources.
2486
+ # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
1987
2487
  # @param [String] fields
1988
2488
  # Selector specifying which fields to include in a partial response.
1989
2489
  # @param [String] quota_user
@@ -1993,39 +2493,725 @@ module Google
1993
2493
  # Request-specific options
1994
2494
  #
1995
2495
  # @yield [result, err] Result & error if block supplied
1996
- # @yieldparam result [Google::Apis::SpannerV1::Transaction] parsed result object
2496
+ # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
1997
2497
  # @yieldparam err [StandardError] error object if request failed
1998
2498
  #
1999
- # @return [Google::Apis::SpannerV1::Transaction]
2499
+ # @return [Google::Apis::SpannerV1::Policy]
2000
2500
  #
2001
2501
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2002
2502
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2003
2503
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2004
- def begin_session_transaction(session, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2005
- command = make_simple_command(:post, 'v1/{+session}:beginTransaction', options)
2006
- command.request_representation = Google::Apis::SpannerV1::BeginTransactionRequest::Representation
2007
- command.request_object = begin_transaction_request_object
2008
- command.response_representation = Google::Apis::SpannerV1::Transaction::Representation
2009
- command.response_class = Google::Apis::SpannerV1::Transaction
2010
- command.params['session'] = session unless session.nil?
2011
- command.query['fields'] = fields unless fields.nil?
2012
- command.query['quotaUser'] = quota_user unless quota_user.nil?
2504
+ def set_backup_schedule_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2505
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
2506
+ command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
2507
+ command.request_object = set_iam_policy_request_object
2508
+ command.response_representation = Google::Apis::SpannerV1::Policy::Representation
2509
+ command.response_class = Google::Apis::SpannerV1::Policy
2510
+ command.params['resource'] = resource unless resource.nil?
2511
+ command.query['fields'] = fields unless fields.nil?
2512
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2513
+ execute_or_queue_command(command, &block)
2514
+ end
2515
+
2516
+ # Returns permissions that the caller has on the specified database or backup
2517
+ # resource. Attempting this RPC on a non-existent Cloud Spanner database will
2518
+ # result in a NOT_FOUND error if the user has `spanner.databases.list`
2519
+ # permission on the containing Cloud Spanner instance. Otherwise returns an
2520
+ # empty set of permissions. Calling this method on a backup that does not exist
2521
+ # will result in a NOT_FOUND error if the user has `spanner.backups.list`
2522
+ # permission on the containing instance. Calling this method on a backup
2523
+ # schedule that does not exist will result in a NOT_FOUND error if the user has `
2524
+ # spanner.backupSchedules.list` permission on the containing database.
2525
+ # @param [String] resource
2526
+ # REQUIRED: The Cloud Spanner resource for which permissions are being tested.
2527
+ # The format is `projects//instances/` for instance resources and `projects//
2528
+ # instances//databases/` for database resources.
2529
+ # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
2530
+ # @param [String] fields
2531
+ # Selector specifying which fields to include in a partial response.
2532
+ # @param [String] quota_user
2533
+ # Available to use for quota purposes for server-side applications. Can be any
2534
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2535
+ # @param [Google::Apis::RequestOptions] options
2536
+ # Request-specific options
2537
+ #
2538
+ # @yield [result, err] Result & error if block supplied
2539
+ # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object
2540
+ # @yieldparam err [StandardError] error object if request failed
2541
+ #
2542
+ # @return [Google::Apis::SpannerV1::TestIamPermissionsResponse]
2543
+ #
2544
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2545
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2546
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2547
+ def test_backup_schedule_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2548
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
2549
+ command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
2550
+ command.request_object = test_iam_permissions_request_object
2551
+ command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
2552
+ command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
2553
+ command.params['resource'] = resource unless resource.nil?
2554
+ command.query['fields'] = fields unless fields.nil?
2555
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2556
+ execute_or_queue_command(command, &block)
2557
+ end
2558
+
2559
+ # Lists Cloud Spanner database roles.
2560
+ # @param [String] parent
2561
+ # Required. The database whose roles should be listed. Values are of the form `
2562
+ # projects//instances//databases/`.
2563
+ # @param [Fixnum] page_size
2564
+ # Number of database roles to be returned in the response. If 0 or less,
2565
+ # defaults to the server's maximum allowed page size.
2566
+ # @param [String] page_token
2567
+ # If non-empty, `page_token` should contain a next_page_token from a previous
2568
+ # ListDatabaseRolesResponse.
2569
+ # @param [String] fields
2570
+ # Selector specifying which fields to include in a partial response.
2571
+ # @param [String] quota_user
2572
+ # Available to use for quota purposes for server-side applications. Can be any
2573
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2574
+ # @param [Google::Apis::RequestOptions] options
2575
+ # Request-specific options
2576
+ #
2577
+ # @yield [result, err] Result & error if block supplied
2578
+ # @yieldparam result [Google::Apis::SpannerV1::ListDatabaseRolesResponse] parsed result object
2579
+ # @yieldparam err [StandardError] error object if request failed
2580
+ #
2581
+ # @return [Google::Apis::SpannerV1::ListDatabaseRolesResponse]
2582
+ #
2583
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2584
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2585
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2586
+ def list_project_instance_database_database_roles(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2587
+ command = make_simple_command(:get, 'v1/{+parent}/databaseRoles', options)
2588
+ command.response_representation = Google::Apis::SpannerV1::ListDatabaseRolesResponse::Representation
2589
+ command.response_class = Google::Apis::SpannerV1::ListDatabaseRolesResponse
2590
+ command.params['parent'] = parent unless parent.nil?
2591
+ command.query['pageSize'] = page_size unless page_size.nil?
2592
+ command.query['pageToken'] = page_token unless page_token.nil?
2593
+ command.query['fields'] = fields unless fields.nil?
2594
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2595
+ execute_or_queue_command(command, &block)
2596
+ end
2597
+
2598
+ # Returns permissions that the caller has on the specified database or backup
2599
+ # resource. Attempting this RPC on a non-existent Cloud Spanner database will
2600
+ # result in a NOT_FOUND error if the user has `spanner.databases.list`
2601
+ # permission on the containing Cloud Spanner instance. Otherwise returns an
2602
+ # empty set of permissions. Calling this method on a backup that does not exist
2603
+ # will result in a NOT_FOUND error if the user has `spanner.backups.list`
2604
+ # permission on the containing instance. Calling this method on a backup
2605
+ # schedule that does not exist will result in a NOT_FOUND error if the user has `
2606
+ # spanner.backupSchedules.list` permission on the containing database.
2607
+ # @param [String] resource
2608
+ # REQUIRED: The Cloud Spanner resource for which permissions are being tested.
2609
+ # The format is `projects//instances/` for instance resources and `projects//
2610
+ # instances//databases/` for database resources.
2611
+ # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
2612
+ # @param [String] fields
2613
+ # Selector specifying which fields to include in a partial response.
2614
+ # @param [String] quota_user
2615
+ # Available to use for quota purposes for server-side applications. Can be any
2616
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2617
+ # @param [Google::Apis::RequestOptions] options
2618
+ # Request-specific options
2619
+ #
2620
+ # @yield [result, err] Result & error if block supplied
2621
+ # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object
2622
+ # @yieldparam err [StandardError] error object if request failed
2623
+ #
2624
+ # @return [Google::Apis::SpannerV1::TestIamPermissionsResponse]
2625
+ #
2626
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2627
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2628
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2629
+ def test_database_role_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2630
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
2631
+ command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
2632
+ command.request_object = test_iam_permissions_request_object
2633
+ command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
2634
+ command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
2635
+ command.params['resource'] = resource unless resource.nil?
2636
+ command.query['fields'] = fields unless fields.nil?
2637
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2638
+ execute_or_queue_command(command, &block)
2639
+ end
2640
+
2641
+ # Starts asynchronous cancellation on a long-running operation. The server makes
2642
+ # a best effort to cancel the operation, but success is not guaranteed. If the
2643
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
2644
+ # Clients can use Operations.GetOperation or other methods to check whether the
2645
+ # cancellation succeeded or whether the operation completed despite cancellation.
2646
+ # On successful cancellation, the operation is not deleted; instead, it becomes
2647
+ # an operation with an Operation.error value with a google.rpc.Status.code of `1`
2648
+ # , corresponding to `Code.CANCELLED`.
2649
+ # @param [String] name
2650
+ # The name of the operation resource to be cancelled.
2651
+ # @param [String] fields
2652
+ # Selector specifying which fields to include in a partial response.
2653
+ # @param [String] quota_user
2654
+ # Available to use for quota purposes for server-side applications. Can be any
2655
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2656
+ # @param [Google::Apis::RequestOptions] options
2657
+ # Request-specific options
2658
+ #
2659
+ # @yield [result, err] Result & error if block supplied
2660
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
2661
+ # @yieldparam err [StandardError] error object if request failed
2662
+ #
2663
+ # @return [Google::Apis::SpannerV1::Empty]
2664
+ #
2665
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2666
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2667
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2668
+ def cancel_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2669
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
2670
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
2671
+ command.response_class = Google::Apis::SpannerV1::Empty
2672
+ command.params['name'] = name unless name.nil?
2673
+ command.query['fields'] = fields unless fields.nil?
2674
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2675
+ execute_or_queue_command(command, &block)
2676
+ end
2677
+
2678
+ # Deletes a long-running operation. This method indicates that the client is no
2679
+ # longer interested in the operation result. It does not cancel the operation.
2680
+ # If the server doesn't support this method, it returns `google.rpc.Code.
2681
+ # UNIMPLEMENTED`.
2682
+ # @param [String] name
2683
+ # The name of the operation resource to be deleted.
2684
+ # @param [String] fields
2685
+ # Selector specifying which fields to include in a partial response.
2686
+ # @param [String] quota_user
2687
+ # Available to use for quota purposes for server-side applications. Can be any
2688
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2689
+ # @param [Google::Apis::RequestOptions] options
2690
+ # Request-specific options
2691
+ #
2692
+ # @yield [result, err] Result & error if block supplied
2693
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
2694
+ # @yieldparam err [StandardError] error object if request failed
2695
+ #
2696
+ # @return [Google::Apis::SpannerV1::Empty]
2697
+ #
2698
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2699
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2700
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2701
+ def delete_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2702
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2703
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
2704
+ command.response_class = Google::Apis::SpannerV1::Empty
2705
+ command.params['name'] = name unless name.nil?
2706
+ command.query['fields'] = fields unless fields.nil?
2707
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2708
+ execute_or_queue_command(command, &block)
2709
+ end
2710
+
2711
+ # Gets the latest state of a long-running operation. Clients can use this method
2712
+ # to poll the operation result at intervals as recommended by the API service.
2713
+ # @param [String] name
2714
+ # The name of the operation resource.
2715
+ # @param [String] fields
2716
+ # Selector specifying which fields to include in a partial response.
2717
+ # @param [String] quota_user
2718
+ # Available to use for quota purposes for server-side applications. Can be any
2719
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2720
+ # @param [Google::Apis::RequestOptions] options
2721
+ # Request-specific options
2722
+ #
2723
+ # @yield [result, err] Result & error if block supplied
2724
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
2725
+ # @yieldparam err [StandardError] error object if request failed
2726
+ #
2727
+ # @return [Google::Apis::SpannerV1::Operation]
2728
+ #
2729
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2730
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2731
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2732
+ def get_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2733
+ command = make_simple_command(:get, 'v1/{+name}', options)
2734
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
2735
+ command.response_class = Google::Apis::SpannerV1::Operation
2736
+ command.params['name'] = name unless name.nil?
2737
+ command.query['fields'] = fields unless fields.nil?
2738
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2739
+ execute_or_queue_command(command, &block)
2740
+ end
2741
+
2742
+ # Lists operations that match the specified filter in the request. If the server
2743
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
2744
+ # @param [String] name
2745
+ # The name of the operation's parent resource.
2746
+ # @param [String] filter
2747
+ # The standard list filter.
2748
+ # @param [Fixnum] page_size
2749
+ # The standard list page size.
2750
+ # @param [String] page_token
2751
+ # The standard list page token.
2752
+ # @param [String] fields
2753
+ # Selector specifying which fields to include in a partial response.
2754
+ # @param [String] quota_user
2755
+ # Available to use for quota purposes for server-side applications. Can be any
2756
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2757
+ # @param [Google::Apis::RequestOptions] options
2758
+ # Request-specific options
2759
+ #
2760
+ # @yield [result, err] Result & error if block supplied
2761
+ # @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object
2762
+ # @yieldparam err [StandardError] error object if request failed
2763
+ #
2764
+ # @return [Google::Apis::SpannerV1::ListOperationsResponse]
2765
+ #
2766
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2767
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2768
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2769
+ def list_project_instance_database_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2770
+ command = make_simple_command(:get, 'v1/{+name}', options)
2771
+ command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
2772
+ command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
2773
+ command.params['name'] = name unless name.nil?
2774
+ command.query['filter'] = filter unless filter.nil?
2775
+ command.query['pageSize'] = page_size unless page_size.nil?
2776
+ command.query['pageToken'] = page_token unless page_token.nil?
2777
+ command.query['fields'] = fields unless fields.nil?
2778
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2779
+ execute_or_queue_command(command, &block)
2780
+ end
2781
+
2782
+ # Creates multiple new sessions. This API can be used to initialize a session
2783
+ # cache on the clients. See https://goo.gl/TgSFN2 for best practices on session
2784
+ # cache management.
2785
+ # @param [String] database
2786
+ # Required. The database in which the new sessions are created.
2787
+ # @param [Google::Apis::SpannerV1::BatchCreateSessionsRequest] batch_create_sessions_request_object
2788
+ # @param [String] fields
2789
+ # Selector specifying which fields to include in a partial response.
2790
+ # @param [String] quota_user
2791
+ # Available to use for quota purposes for server-side applications. Can be any
2792
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2793
+ # @param [Google::Apis::RequestOptions] options
2794
+ # Request-specific options
2795
+ #
2796
+ # @yield [result, err] Result & error if block supplied
2797
+ # @yieldparam result [Google::Apis::SpannerV1::BatchCreateSessionsResponse] parsed result object
2798
+ # @yieldparam err [StandardError] error object if request failed
2799
+ #
2800
+ # @return [Google::Apis::SpannerV1::BatchCreateSessionsResponse]
2801
+ #
2802
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2803
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2804
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2805
+ def batch_create_sessions(database, batch_create_sessions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2806
+ command = make_simple_command(:post, 'v1/{+database}/sessions:batchCreate', options)
2807
+ command.request_representation = Google::Apis::SpannerV1::BatchCreateSessionsRequest::Representation
2808
+ command.request_object = batch_create_sessions_request_object
2809
+ command.response_representation = Google::Apis::SpannerV1::BatchCreateSessionsResponse::Representation
2810
+ command.response_class = Google::Apis::SpannerV1::BatchCreateSessionsResponse
2811
+ command.params['database'] = database unless database.nil?
2812
+ command.query['fields'] = fields unless fields.nil?
2813
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2814
+ execute_or_queue_command(command, &block)
2815
+ end
2816
+
2817
+ # Batches the supplied mutation groups in a collection of efficient transactions.
2818
+ # All mutations in a group are committed atomically. However, mutations across
2819
+ # groups can be committed non-atomically in an unspecified order and thus, they
2820
+ # must be independent of each other. Partial failure is possible, i.e., some
2821
+ # groups may have been committed successfully, while some may have failed. The
2822
+ # results of individual batches are streamed into the response as the batches
2823
+ # are applied. BatchWrite requests are not replay protected, meaning that each
2824
+ # mutation group may be applied more than once. Replays of non-idempotent
2825
+ # mutations may have undesirable effects. For example, replays of an insert
2826
+ # mutation may produce an already exists error or if you use generated or commit
2827
+ # timestamp-based keys, it may result in additional rows being added to the
2828
+ # mutation's table. We recommend structuring your mutation groups to be
2829
+ # idempotent to avoid this issue.
2830
+ # @param [String] session
2831
+ # Required. The session in which the batch request is to be run.
2832
+ # @param [Google::Apis::SpannerV1::BatchWriteRequest] batch_write_request_object
2833
+ # @param [String] fields
2834
+ # Selector specifying which fields to include in a partial response.
2835
+ # @param [String] quota_user
2836
+ # Available to use for quota purposes for server-side applications. Can be any
2837
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2838
+ # @param [Google::Apis::RequestOptions] options
2839
+ # Request-specific options
2840
+ #
2841
+ # @yield [result, err] Result & error if block supplied
2842
+ # @yieldparam result [Google::Apis::SpannerV1::BatchWriteResponse] parsed result object
2843
+ # @yieldparam err [StandardError] error object if request failed
2844
+ #
2845
+ # @return [Google::Apis::SpannerV1::BatchWriteResponse]
2846
+ #
2847
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2848
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2849
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2850
+ def batch_session_write(session, batch_write_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2851
+ command = make_simple_command(:post, 'v1/{+session}:batchWrite', options)
2852
+ command.request_representation = Google::Apis::SpannerV1::BatchWriteRequest::Representation
2853
+ command.request_object = batch_write_request_object
2854
+ command.response_representation = Google::Apis::SpannerV1::BatchWriteResponse::Representation
2855
+ command.response_class = Google::Apis::SpannerV1::BatchWriteResponse
2856
+ command.params['session'] = session unless session.nil?
2857
+ command.query['fields'] = fields unless fields.nil?
2858
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2859
+ execute_or_queue_command(command, &block)
2860
+ end
2861
+
2862
+ # Begins a new transaction. This step can often be skipped: Read, ExecuteSql and
2863
+ # Commit can begin a new transaction as a side-effect.
2864
+ # @param [String] session
2865
+ # Required. The session in which the transaction runs.
2866
+ # @param [Google::Apis::SpannerV1::BeginTransactionRequest] begin_transaction_request_object
2867
+ # @param [String] fields
2868
+ # Selector specifying which fields to include in a partial response.
2869
+ # @param [String] quota_user
2870
+ # Available to use for quota purposes for server-side applications. Can be any
2871
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2872
+ # @param [Google::Apis::RequestOptions] options
2873
+ # Request-specific options
2874
+ #
2875
+ # @yield [result, err] Result & error if block supplied
2876
+ # @yieldparam result [Google::Apis::SpannerV1::Transaction] parsed result object
2877
+ # @yieldparam err [StandardError] error object if request failed
2878
+ #
2879
+ # @return [Google::Apis::SpannerV1::Transaction]
2880
+ #
2881
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2882
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2883
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2884
+ def begin_session_transaction(session, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2885
+ command = make_simple_command(:post, 'v1/{+session}:beginTransaction', options)
2886
+ command.request_representation = Google::Apis::SpannerV1::BeginTransactionRequest::Representation
2887
+ command.request_object = begin_transaction_request_object
2888
+ command.response_representation = Google::Apis::SpannerV1::Transaction::Representation
2889
+ command.response_class = Google::Apis::SpannerV1::Transaction
2890
+ command.params['session'] = session unless session.nil?
2891
+ command.query['fields'] = fields unless fields.nil?
2892
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2893
+ execute_or_queue_command(command, &block)
2894
+ end
2895
+
2896
+ # Commits a transaction. The request includes the mutations to be applied to
2897
+ # rows in the database. `Commit` might return an `ABORTED` error. This can occur
2898
+ # at any time; commonly, the cause is conflicts with concurrent transactions.
2899
+ # However, it can also happen for a variety of other reasons. If `Commit`
2900
+ # returns `ABORTED`, the caller should re-attempt the transaction from the
2901
+ # beginning, re-using the same session. On very rare occasions, `Commit` might
2902
+ # return `UNKNOWN`. This can happen, for example, if the client job experiences
2903
+ # a 1+ hour networking failure. At that point, Cloud Spanner has lost track of
2904
+ # the transaction outcome and we recommend that you perform another read from
2905
+ # the database to see the state of things as they are now.
2906
+ # @param [String] session
2907
+ # Required. The session in which the transaction to be committed is running.
2908
+ # @param [Google::Apis::SpannerV1::CommitRequest] commit_request_object
2909
+ # @param [String] fields
2910
+ # Selector specifying which fields to include in a partial response.
2911
+ # @param [String] quota_user
2912
+ # Available to use for quota purposes for server-side applications. Can be any
2913
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2914
+ # @param [Google::Apis::RequestOptions] options
2915
+ # Request-specific options
2916
+ #
2917
+ # @yield [result, err] Result & error if block supplied
2918
+ # @yieldparam result [Google::Apis::SpannerV1::CommitResponse] parsed result object
2919
+ # @yieldparam err [StandardError] error object if request failed
2920
+ #
2921
+ # @return [Google::Apis::SpannerV1::CommitResponse]
2922
+ #
2923
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2924
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2925
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2926
+ def commit_session(session, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2927
+ command = make_simple_command(:post, 'v1/{+session}:commit', options)
2928
+ command.request_representation = Google::Apis::SpannerV1::CommitRequest::Representation
2929
+ command.request_object = commit_request_object
2930
+ command.response_representation = Google::Apis::SpannerV1::CommitResponse::Representation
2931
+ command.response_class = Google::Apis::SpannerV1::CommitResponse
2932
+ command.params['session'] = session unless session.nil?
2933
+ command.query['fields'] = fields unless fields.nil?
2934
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2935
+ execute_or_queue_command(command, &block)
2936
+ end
2937
+
2938
+ # Creates a new session. A session can be used to perform transactions that read
2939
+ # and/or modify data in a Cloud Spanner database. Sessions are meant to be
2940
+ # reused for many consecutive transactions. Sessions can only execute one
2941
+ # transaction at a time. To execute multiple concurrent read-write/write-only
2942
+ # transactions, create multiple sessions. Note that standalone reads and queries
2943
+ # use a transaction internally, and count toward the one transaction limit.
2944
+ # Active sessions use additional server resources, so it is a good idea to
2945
+ # delete idle and unneeded sessions. Aside from explicit deletes, Cloud Spanner
2946
+ # may delete sessions for which no operations are sent for more than an hour. If
2947
+ # a session is deleted, requests to it return `NOT_FOUND`. Idle sessions can be
2948
+ # kept alive by sending a trivial SQL query periodically, e.g., `"SELECT 1"`.
2949
+ # @param [String] database
2950
+ # Required. The database in which the new session is created.
2951
+ # @param [Google::Apis::SpannerV1::CreateSessionRequest] create_session_request_object
2952
+ # @param [String] fields
2953
+ # Selector specifying which fields to include in a partial response.
2954
+ # @param [String] quota_user
2955
+ # Available to use for quota purposes for server-side applications. Can be any
2956
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2957
+ # @param [Google::Apis::RequestOptions] options
2958
+ # Request-specific options
2959
+ #
2960
+ # @yield [result, err] Result & error if block supplied
2961
+ # @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object
2962
+ # @yieldparam err [StandardError] error object if request failed
2963
+ #
2964
+ # @return [Google::Apis::SpannerV1::Session]
2965
+ #
2966
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2967
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2968
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2969
+ def create_project_instance_database_session(database, create_session_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2970
+ command = make_simple_command(:post, 'v1/{+database}/sessions', options)
2971
+ command.request_representation = Google::Apis::SpannerV1::CreateSessionRequest::Representation
2972
+ command.request_object = create_session_request_object
2973
+ command.response_representation = Google::Apis::SpannerV1::Session::Representation
2974
+ command.response_class = Google::Apis::SpannerV1::Session
2975
+ command.params['database'] = database unless database.nil?
2976
+ command.query['fields'] = fields unless fields.nil?
2977
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2978
+ execute_or_queue_command(command, &block)
2979
+ end
2980
+
2981
+ # Ends a session, releasing server resources associated with it. This will
2982
+ # asynchronously trigger cancellation of any operations that are running with
2983
+ # this session.
2984
+ # @param [String] name
2985
+ # Required. The name of the session to delete.
2986
+ # @param [String] fields
2987
+ # Selector specifying which fields to include in a partial response.
2988
+ # @param [String] quota_user
2989
+ # Available to use for quota purposes for server-side applications. Can be any
2990
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2991
+ # @param [Google::Apis::RequestOptions] options
2992
+ # Request-specific options
2993
+ #
2994
+ # @yield [result, err] Result & error if block supplied
2995
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
2996
+ # @yieldparam err [StandardError] error object if request failed
2997
+ #
2998
+ # @return [Google::Apis::SpannerV1::Empty]
2999
+ #
3000
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3001
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3002
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3003
+ def delete_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block)
3004
+ command = make_simple_command(:delete, 'v1/{+name}', options)
3005
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
3006
+ command.response_class = Google::Apis::SpannerV1::Empty
3007
+ command.params['name'] = name unless name.nil?
3008
+ command.query['fields'] = fields unless fields.nil?
3009
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3010
+ execute_or_queue_command(command, &block)
3011
+ end
3012
+
3013
+ # Executes a batch of SQL DML statements. This method allows many statements to
3014
+ # be run with lower latency than submitting them sequentially with ExecuteSql.
3015
+ # Statements are executed in sequential order. A request can succeed even if a
3016
+ # statement fails. The ExecuteBatchDmlResponse.status field in the response
3017
+ # provides information about the statement that failed. Clients must inspect
3018
+ # this field to determine whether an error occurred. Execution stops after the
3019
+ # first failed statement; the remaining statements are not executed.
3020
+ # @param [String] session
3021
+ # Required. The session in which the DML statements should be performed.
3022
+ # @param [Google::Apis::SpannerV1::ExecuteBatchDmlRequest] execute_batch_dml_request_object
3023
+ # @param [String] fields
3024
+ # Selector specifying which fields to include in a partial response.
3025
+ # @param [String] quota_user
3026
+ # Available to use for quota purposes for server-side applications. Can be any
3027
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3028
+ # @param [Google::Apis::RequestOptions] options
3029
+ # Request-specific options
3030
+ #
3031
+ # @yield [result, err] Result & error if block supplied
3032
+ # @yieldparam result [Google::Apis::SpannerV1::ExecuteBatchDmlResponse] parsed result object
3033
+ # @yieldparam err [StandardError] error object if request failed
3034
+ #
3035
+ # @return [Google::Apis::SpannerV1::ExecuteBatchDmlResponse]
3036
+ #
3037
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3038
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3039
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3040
+ def execute_session_batch_dml(session, execute_batch_dml_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3041
+ command = make_simple_command(:post, 'v1/{+session}:executeBatchDml', options)
3042
+ command.request_representation = Google::Apis::SpannerV1::ExecuteBatchDmlRequest::Representation
3043
+ command.request_object = execute_batch_dml_request_object
3044
+ command.response_representation = Google::Apis::SpannerV1::ExecuteBatchDmlResponse::Representation
3045
+ command.response_class = Google::Apis::SpannerV1::ExecuteBatchDmlResponse
3046
+ command.params['session'] = session unless session.nil?
3047
+ command.query['fields'] = fields unless fields.nil?
3048
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3049
+ execute_or_queue_command(command, &block)
3050
+ end
3051
+
3052
+ # Executes an SQL statement, returning all results in a single reply. This
3053
+ # method cannot be used to return a result set larger than 10 MiB; if the query
3054
+ # yields more data than that, the query fails with a `FAILED_PRECONDITION` error.
3055
+ # Operations inside read-write transactions might return `ABORTED`. If this
3056
+ # occurs, the application should restart the transaction from the beginning. See
3057
+ # Transaction for more details. Larger result sets can be fetched in streaming
3058
+ # fashion by calling ExecuteStreamingSql instead.
3059
+ # @param [String] session
3060
+ # Required. The session in which the SQL query should be performed.
3061
+ # @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object
3062
+ # @param [String] fields
3063
+ # Selector specifying which fields to include in a partial response.
3064
+ # @param [String] quota_user
3065
+ # Available to use for quota purposes for server-side applications. Can be any
3066
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3067
+ # @param [Google::Apis::RequestOptions] options
3068
+ # Request-specific options
3069
+ #
3070
+ # @yield [result, err] Result & error if block supplied
3071
+ # @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
3072
+ # @yieldparam err [StandardError] error object if request failed
3073
+ #
3074
+ # @return [Google::Apis::SpannerV1::ResultSet]
3075
+ #
3076
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3077
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3078
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3079
+ def execute_session_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3080
+ command = make_simple_command(:post, 'v1/{+session}:executeSql', options)
3081
+ command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation
3082
+ command.request_object = execute_sql_request_object
3083
+ command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
3084
+ command.response_class = Google::Apis::SpannerV1::ResultSet
3085
+ command.params['session'] = session unless session.nil?
3086
+ command.query['fields'] = fields unless fields.nil?
3087
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3088
+ execute_or_queue_command(command, &block)
3089
+ end
3090
+
3091
+ # Like ExecuteSql, except returns the result set as a stream. Unlike ExecuteSql,
3092
+ # there is no limit on the size of the returned result set. However, no
3093
+ # individual row in the result set can exceed 100 MiB, and no column value can
3094
+ # exceed 10 MiB.
3095
+ # @param [String] session
3096
+ # Required. The session in which the SQL query should be performed.
3097
+ # @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object
3098
+ # @param [String] fields
3099
+ # Selector specifying which fields to include in a partial response.
3100
+ # @param [String] quota_user
3101
+ # Available to use for quota purposes for server-side applications. Can be any
3102
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3103
+ # @param [Google::Apis::RequestOptions] options
3104
+ # Request-specific options
3105
+ #
3106
+ # @yield [result, err] Result & error if block supplied
3107
+ # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
3108
+ # @yieldparam err [StandardError] error object if request failed
3109
+ #
3110
+ # @return [Google::Apis::SpannerV1::PartialResultSet]
3111
+ #
3112
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3113
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3114
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3115
+ def execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3116
+ command = make_simple_command(:post, 'v1/{+session}:executeStreamingSql', options)
3117
+ command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation
3118
+ command.request_object = execute_sql_request_object
3119
+ command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
3120
+ command.response_class = Google::Apis::SpannerV1::PartialResultSet
3121
+ command.params['session'] = session unless session.nil?
3122
+ command.query['fields'] = fields unless fields.nil?
3123
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3124
+ execute_or_queue_command(command, &block)
3125
+ end
3126
+
3127
+ # Gets a session. Returns `NOT_FOUND` if the session does not exist. This is
3128
+ # mainly useful for determining whether a session is still alive.
3129
+ # @param [String] name
3130
+ # Required. The name of the session to retrieve.
3131
+ # @param [String] fields
3132
+ # Selector specifying which fields to include in a partial response.
3133
+ # @param [String] quota_user
3134
+ # Available to use for quota purposes for server-side applications. Can be any
3135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3136
+ # @param [Google::Apis::RequestOptions] options
3137
+ # Request-specific options
3138
+ #
3139
+ # @yield [result, err] Result & error if block supplied
3140
+ # @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object
3141
+ # @yieldparam err [StandardError] error object if request failed
3142
+ #
3143
+ # @return [Google::Apis::SpannerV1::Session]
3144
+ #
3145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3148
+ def get_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block)
3149
+ command = make_simple_command(:get, 'v1/{+name}', options)
3150
+ command.response_representation = Google::Apis::SpannerV1::Session::Representation
3151
+ command.response_class = Google::Apis::SpannerV1::Session
3152
+ command.params['name'] = name unless name.nil?
3153
+ command.query['fields'] = fields unless fields.nil?
3154
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2013
3155
  execute_or_queue_command(command, &block)
2014
3156
  end
2015
3157
 
2016
- # Commits a transaction. The request includes the mutations to be applied to
2017
- # rows in the database. `Commit` might return an `ABORTED` error. This can occur
2018
- # at any time; commonly, the cause is conflicts with concurrent transactions.
2019
- # However, it can also happen for a variety of other reasons. If `Commit`
2020
- # returns `ABORTED`, the caller should re-attempt the transaction from the
2021
- # beginning, re-using the same session. On very rare occasions, `Commit` might
2022
- # return `UNKNOWN`. This can happen, for example, if the client job experiences
2023
- # a 1+ hour networking failure. At that point, Cloud Spanner has lost track of
2024
- # the transaction outcome and we recommend that you perform another read from
2025
- # the database to see the state of things as they are now.
3158
+ # Lists all sessions in a given database.
3159
+ # @param [String] database
3160
+ # Required. The database in which to list sessions.
3161
+ # @param [String] filter
3162
+ # An expression for filtering the results of the request. Filter rules are case
3163
+ # insensitive. The fields eligible for filtering are: * `labels.key` where key
3164
+ # is the name of a label Some examples of using filters are: * `labels.env:*` -->
3165
+ # The session has the label "env". * `labels.env:dev` --> The session has the
3166
+ # label "env" and the value of the label contains the string "dev".
3167
+ # @param [Fixnum] page_size
3168
+ # Number of sessions to be returned in the response. If 0 or less, defaults to
3169
+ # the server's maximum allowed page size.
3170
+ # @param [String] page_token
3171
+ # If non-empty, `page_token` should contain a next_page_token from a previous
3172
+ # ListSessionsResponse.
3173
+ # @param [String] fields
3174
+ # Selector specifying which fields to include in a partial response.
3175
+ # @param [String] quota_user
3176
+ # Available to use for quota purposes for server-side applications. Can be any
3177
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3178
+ # @param [Google::Apis::RequestOptions] options
3179
+ # Request-specific options
3180
+ #
3181
+ # @yield [result, err] Result & error if block supplied
3182
+ # @yieldparam result [Google::Apis::SpannerV1::ListSessionsResponse] parsed result object
3183
+ # @yieldparam err [StandardError] error object if request failed
3184
+ #
3185
+ # @return [Google::Apis::SpannerV1::ListSessionsResponse]
3186
+ #
3187
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3188
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3189
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3190
+ def list_project_instance_database_sessions(database, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3191
+ command = make_simple_command(:get, 'v1/{+database}/sessions', options)
3192
+ command.response_representation = Google::Apis::SpannerV1::ListSessionsResponse::Representation
3193
+ command.response_class = Google::Apis::SpannerV1::ListSessionsResponse
3194
+ command.params['database'] = database unless database.nil?
3195
+ command.query['filter'] = filter unless filter.nil?
3196
+ command.query['pageSize'] = page_size unless page_size.nil?
3197
+ command.query['pageToken'] = page_token unless page_token.nil?
3198
+ command.query['fields'] = fields unless fields.nil?
3199
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3200
+ execute_or_queue_command(command, &block)
3201
+ end
3202
+
3203
+ # Creates a set of partition tokens that can be used to execute a query
3204
+ # operation in parallel. Each of the returned partition tokens can be used by
3205
+ # ExecuteStreamingSql to specify a subset of the query result to read. The same
3206
+ # session and read-only transaction must be used by the PartitionQueryRequest
3207
+ # used to create the partition tokens and the ExecuteSqlRequests that use the
3208
+ # partition tokens. Partition tokens become invalid when the session used to
3209
+ # create them is deleted, is idle for too long, begins a new transaction, or
3210
+ # becomes too old. When any of these happen, it is not possible to resume the
3211
+ # query, and the whole operation must be restarted from the beginning.
2026
3212
  # @param [String] session
2027
- # Required. The session in which the transaction to be committed is running.
2028
- # @param [Google::Apis::SpannerV1::CommitRequest] commit_request_object
3213
+ # Required. The session used to create the partitions.
3214
+ # @param [Google::Apis::SpannerV1::PartitionQueryRequest] partition_query_request_object
2029
3215
  # @param [String] fields
2030
3216
  # Selector specifying which fields to include in a partial response.
2031
3217
  # @param [String] quota_user
@@ -2035,40 +3221,40 @@ module Google
2035
3221
  # Request-specific options
2036
3222
  #
2037
3223
  # @yield [result, err] Result & error if block supplied
2038
- # @yieldparam result [Google::Apis::SpannerV1::CommitResponse] parsed result object
3224
+ # @yieldparam result [Google::Apis::SpannerV1::PartitionResponse] parsed result object
2039
3225
  # @yieldparam err [StandardError] error object if request failed
2040
3226
  #
2041
- # @return [Google::Apis::SpannerV1::CommitResponse]
3227
+ # @return [Google::Apis::SpannerV1::PartitionResponse]
2042
3228
  #
2043
3229
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2044
3230
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2045
3231
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2046
- def commit_session(session, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2047
- command = make_simple_command(:post, 'v1/{+session}:commit', options)
2048
- command.request_representation = Google::Apis::SpannerV1::CommitRequest::Representation
2049
- command.request_object = commit_request_object
2050
- command.response_representation = Google::Apis::SpannerV1::CommitResponse::Representation
2051
- command.response_class = Google::Apis::SpannerV1::CommitResponse
3232
+ def partition_session_query(session, partition_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3233
+ command = make_simple_command(:post, 'v1/{+session}:partitionQuery', options)
3234
+ command.request_representation = Google::Apis::SpannerV1::PartitionQueryRequest::Representation
3235
+ command.request_object = partition_query_request_object
3236
+ command.response_representation = Google::Apis::SpannerV1::PartitionResponse::Representation
3237
+ command.response_class = Google::Apis::SpannerV1::PartitionResponse
2052
3238
  command.params['session'] = session unless session.nil?
2053
3239
  command.query['fields'] = fields unless fields.nil?
2054
3240
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2055
3241
  execute_or_queue_command(command, &block)
2056
3242
  end
2057
3243
 
2058
- # Creates a new session. A session can be used to perform transactions that read
2059
- # and/or modify data in a Cloud Spanner database. Sessions are meant to be
2060
- # reused for many consecutive transactions. Sessions can only execute one
2061
- # transaction at a time. To execute multiple concurrent read-write/write-only
2062
- # transactions, create multiple sessions. Note that standalone reads and queries
2063
- # use a transaction internally, and count toward the one transaction limit.
2064
- # Active sessions use additional server resources, so it is a good idea to
2065
- # delete idle and unneeded sessions. Aside from explicit deletes, Cloud Spanner
2066
- # may delete sessions for which no operations are sent for more than an hour. If
2067
- # a session is deleted, requests to it return `NOT_FOUND`. Idle sessions can be
2068
- # kept alive by sending a trivial SQL query periodically, e.g., `"SELECT 1"`.
2069
- # @param [String] database
2070
- # Required. The database in which the new session is created.
2071
- # @param [Google::Apis::SpannerV1::CreateSessionRequest] create_session_request_object
3244
+ # Creates a set of partition tokens that can be used to execute a read operation
3245
+ # in parallel. Each of the returned partition tokens can be used by
3246
+ # StreamingRead to specify a subset of the read result to read. The same session
3247
+ # and read-only transaction must be used by the PartitionReadRequest used to
3248
+ # create the partition tokens and the ReadRequests that use the partition tokens.
3249
+ # There are no ordering guarantees on rows returned among the returned
3250
+ # partition tokens, or even within each individual StreamingRead call issued
3251
+ # with a partition_token. Partition tokens become invalid when the session used
3252
+ # to create them is deleted, is idle for too long, begins a new transaction, or
3253
+ # becomes too old. When any of these happen, it is not possible to resume the
3254
+ # read, and the whole operation must be restarted from the beginning.
3255
+ # @param [String] session
3256
+ # Required. The session used to create the partitions.
3257
+ # @param [Google::Apis::SpannerV1::PartitionReadRequest] partition_read_request_object
2072
3258
  # @param [String] fields
2073
3259
  # Selector specifying which fields to include in a partial response.
2074
3260
  # @param [String] quota_user
@@ -2078,31 +3264,74 @@ module Google
2078
3264
  # Request-specific options
2079
3265
  #
2080
3266
  # @yield [result, err] Result & error if block supplied
2081
- # @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object
3267
+ # @yieldparam result [Google::Apis::SpannerV1::PartitionResponse] parsed result object
2082
3268
  # @yieldparam err [StandardError] error object if request failed
2083
3269
  #
2084
- # @return [Google::Apis::SpannerV1::Session]
3270
+ # @return [Google::Apis::SpannerV1::PartitionResponse]
2085
3271
  #
2086
3272
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2087
3273
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2088
3274
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2089
- def create_project_instance_database_session(database, create_session_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2090
- command = make_simple_command(:post, 'v1/{+database}/sessions', options)
2091
- command.request_representation = Google::Apis::SpannerV1::CreateSessionRequest::Representation
2092
- command.request_object = create_session_request_object
2093
- command.response_representation = Google::Apis::SpannerV1::Session::Representation
2094
- command.response_class = Google::Apis::SpannerV1::Session
2095
- command.params['database'] = database unless database.nil?
3275
+ def partition_session_read(session, partition_read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3276
+ command = make_simple_command(:post, 'v1/{+session}:partitionRead', options)
3277
+ command.request_representation = Google::Apis::SpannerV1::PartitionReadRequest::Representation
3278
+ command.request_object = partition_read_request_object
3279
+ command.response_representation = Google::Apis::SpannerV1::PartitionResponse::Representation
3280
+ command.response_class = Google::Apis::SpannerV1::PartitionResponse
3281
+ command.params['session'] = session unless session.nil?
2096
3282
  command.query['fields'] = fields unless fields.nil?
2097
3283
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2098
3284
  execute_or_queue_command(command, &block)
2099
3285
  end
2100
3286
 
2101
- # Ends a session, releasing server resources associated with it. This will
2102
- # asynchronously trigger cancellation of any operations that are running with
2103
- # this session.
2104
- # @param [String] name
2105
- # Required. The name of the session to delete.
3287
+ # Reads rows from the database using key lookups and scans, as a simple key/
3288
+ # value style alternative to ExecuteSql. This method cannot be used to return a
3289
+ # result set larger than 10 MiB; if the read matches more data than that, the
3290
+ # read fails with a `FAILED_PRECONDITION` error. Reads inside read-write
3291
+ # transactions might return `ABORTED`. If this occurs, the application should
3292
+ # restart the transaction from the beginning. See Transaction for more details.
3293
+ # Larger result sets can be yielded in streaming fashion by calling
3294
+ # StreamingRead instead.
3295
+ # @param [String] session
3296
+ # Required. The session in which the read should be performed.
3297
+ # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
3298
+ # @param [String] fields
3299
+ # Selector specifying which fields to include in a partial response.
3300
+ # @param [String] quota_user
3301
+ # Available to use for quota purposes for server-side applications. Can be any
3302
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3303
+ # @param [Google::Apis::RequestOptions] options
3304
+ # Request-specific options
3305
+ #
3306
+ # @yield [result, err] Result & error if block supplied
3307
+ # @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
3308
+ # @yieldparam err [StandardError] error object if request failed
3309
+ #
3310
+ # @return [Google::Apis::SpannerV1::ResultSet]
3311
+ #
3312
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3313
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3314
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3315
+ def read_session(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3316
+ command = make_simple_command(:post, 'v1/{+session}:read', options)
3317
+ command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
3318
+ command.request_object = read_request_object
3319
+ command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
3320
+ command.response_class = Google::Apis::SpannerV1::ResultSet
3321
+ command.params['session'] = session unless session.nil?
3322
+ command.query['fields'] = fields unless fields.nil?
3323
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3324
+ execute_or_queue_command(command, &block)
3325
+ end
3326
+
3327
+ # Rolls back a transaction, releasing any locks it holds. It is a good idea to
3328
+ # call this for any transaction that includes one or more Read or ExecuteSql
3329
+ # requests and ultimately decides not to commit. `Rollback` returns `OK` if it
3330
+ # successfully aborts the transaction, the transaction was already aborted, or
3331
+ # the transaction is not found. `Rollback` never returns `ABORTED`.
3332
+ # @param [String] session
3333
+ # Required. The session in which the transaction to roll back is running.
3334
+ # @param [Google::Apis::SpannerV1::RollbackRequest] rollback_request_object
2106
3335
  # @param [String] fields
2107
3336
  # Selector specifying which fields to include in a partial response.
2108
3337
  # @param [String] quota_user
@@ -2120,26 +3349,102 @@ module Google
2120
3349
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2121
3350
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2122
3351
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2123
- def delete_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block)
2124
- command = make_simple_command(:delete, 'v1/{+name}', options)
3352
+ def rollback_session(session, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3353
+ command = make_simple_command(:post, 'v1/{+session}:rollback', options)
3354
+ command.request_representation = Google::Apis::SpannerV1::RollbackRequest::Representation
3355
+ command.request_object = rollback_request_object
2125
3356
  command.response_representation = Google::Apis::SpannerV1::Empty::Representation
2126
3357
  command.response_class = Google::Apis::SpannerV1::Empty
2127
- command.params['name'] = name unless name.nil?
3358
+ command.params['session'] = session unless session.nil?
2128
3359
  command.query['fields'] = fields unless fields.nil?
2129
3360
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2130
3361
  execute_or_queue_command(command, &block)
2131
3362
  end
2132
3363
 
2133
- # Executes a batch of SQL DML statements. This method allows many statements to
2134
- # be run with lower latency than submitting them sequentially with ExecuteSql.
2135
- # Statements are executed in sequential order. A request can succeed even if a
2136
- # statement fails. The ExecuteBatchDmlResponse.status field in the response
2137
- # provides information about the statement that failed. Clients must inspect
2138
- # this field to determine whether an error occurred. Execution stops after the
2139
- # first failed statement; the remaining statements are not executed.
3364
+ # Like Read, except returns the result set as a stream. Unlike Read, there is no
3365
+ # limit on the size of the returned result set. However, no individual row in
3366
+ # the result set can exceed 100 MiB, and no column value can exceed 10 MiB.
2140
3367
  # @param [String] session
2141
- # Required. The session in which the DML statements should be performed.
2142
- # @param [Google::Apis::SpannerV1::ExecuteBatchDmlRequest] execute_batch_dml_request_object
3368
+ # Required. The session in which the read should be performed.
3369
+ # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
3370
+ # @param [String] fields
3371
+ # Selector specifying which fields to include in a partial response.
3372
+ # @param [String] quota_user
3373
+ # Available to use for quota purposes for server-side applications. Can be any
3374
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3375
+ # @param [Google::Apis::RequestOptions] options
3376
+ # Request-specific options
3377
+ #
3378
+ # @yield [result, err] Result & error if block supplied
3379
+ # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
3380
+ # @yieldparam err [StandardError] error object if request failed
3381
+ #
3382
+ # @return [Google::Apis::SpannerV1::PartialResultSet]
3383
+ #
3384
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3385
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3386
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3387
+ def streaming_project_instance_database_session_read(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3388
+ command = make_simple_command(:post, 'v1/{+session}:streamingRead', options)
3389
+ command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
3390
+ command.request_object = read_request_object
3391
+ command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
3392
+ command.response_class = Google::Apis::SpannerV1::PartialResultSet
3393
+ command.params['session'] = session unless session.nil?
3394
+ command.query['fields'] = fields unless fields.nil?
3395
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3396
+ execute_or_queue_command(command, &block)
3397
+ end
3398
+
3399
+ # Lists instance partition long-running operations in the given instance. An
3400
+ # instance partition operation has a name of the form `projects//instances//
3401
+ # instancePartitions//operations/`. The long-running operation metadata field
3402
+ # type `metadata.type_url` describes the type of the metadata. Operations
3403
+ # returned include those that have completed/failed/canceled within the last 7
3404
+ # days, and pending operations. Operations returned are ordered by `operation.
3405
+ # metadata.value.start_time` in descending order starting from the most recently
3406
+ # started operation. Authorization requires `spanner.instancePartitionOperations.
3407
+ # list` permission on the resource parent.
3408
+ # @param [String] parent
3409
+ # Required. The parent instance of the instance partition operations. Values are
3410
+ # of the form `projects//instances/`.
3411
+ # @param [String] filter
3412
+ # Optional. An expression that filters the list of returned operations. A filter
3413
+ # expression consists of a field name, a comparison operator, and a value for
3414
+ # filtering. The value must be a string, a number, or a boolean. The comparison
3415
+ # operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is
3416
+ # the contains operator. Filter rules are not case sensitive. The following
3417
+ # fields in the Operation are eligible for filtering: * `name` - The name of the
3418
+ # long-running operation * `done` - False if the operation is in progress, else
3419
+ # true. * `metadata.@type` - the type of metadata. For example, the type string
3420
+ # for CreateInstancePartitionMetadata is `type.googleapis.com/google.spanner.
3421
+ # admin.instance.v1.CreateInstancePartitionMetadata`. * `metadata.` - any field
3422
+ # in metadata.value. `metadata.@type` must be specified first, if filtering on
3423
+ # metadata fields. * `error` - Error associated with the long-running operation.
3424
+ # * `response.@type` - the type of response. * `response.` - any field in
3425
+ # response.value. You can combine multiple expressions by enclosing each
3426
+ # expression in parentheses. By default, expressions are combined with AND logic.
3427
+ # However, you can specify AND, OR, and NOT logic explicitly. Here are a few
3428
+ # examples: * `done:true` - The operation is complete. * `(metadata.@type=` \ `
3429
+ # type.googleapis.com/google.spanner.admin.instance.v1.
3430
+ # CreateInstancePartitionMetadata) AND` \ `(metadata.instance_partition.name:
3431
+ # custom-instance-partition) AND` \ `(metadata.start_time < \"2021-03-28T14:50:
3432
+ # 00Z\") AND` \ `(error:*)` - Return operations where: * The operation's
3433
+ # metadata type is CreateInstancePartitionMetadata. * The instance partition
3434
+ # name contains "custom-instance-partition". * The operation started before 2021-
3435
+ # 03-28T14:50:00Z. * The operation resulted in an error.
3436
+ # @param [String] instance_partition_deadline
3437
+ # Optional. Deadline used while retrieving metadata for instance partition
3438
+ # operations. Instance partitions whose operation metadata cannot be retrieved
3439
+ # within this deadline will be added to unreachable_instance_partitions in
3440
+ # ListInstancePartitionOperationsResponse.
3441
+ # @param [Fixnum] page_size
3442
+ # Optional. Number of operations to be returned in the response. If 0 or less,
3443
+ # defaults to the server's maximum allowed page size.
3444
+ # @param [String] page_token
3445
+ # Optional. If non-empty, `page_token` should contain a next_page_token from a
3446
+ # previous ListInstancePartitionOperationsResponse to the same `parent` and with
3447
+ # the same `filter`.
2143
3448
  # @param [String] fields
2144
3449
  # Selector specifying which fields to include in a partial response.
2145
3450
  # @param [String] quota_user
@@ -2149,36 +3454,50 @@ module Google
2149
3454
  # Request-specific options
2150
3455
  #
2151
3456
  # @yield [result, err] Result & error if block supplied
2152
- # @yieldparam result [Google::Apis::SpannerV1::ExecuteBatchDmlResponse] parsed result object
3457
+ # @yieldparam result [Google::Apis::SpannerV1::ListInstancePartitionOperationsResponse] parsed result object
2153
3458
  # @yieldparam err [StandardError] error object if request failed
2154
3459
  #
2155
- # @return [Google::Apis::SpannerV1::ExecuteBatchDmlResponse]
3460
+ # @return [Google::Apis::SpannerV1::ListInstancePartitionOperationsResponse]
2156
3461
  #
2157
3462
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2158
3463
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2159
3464
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2160
- def execute_session_batch_dml(session, execute_batch_dml_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2161
- command = make_simple_command(:post, 'v1/{+session}:executeBatchDml', options)
2162
- command.request_representation = Google::Apis::SpannerV1::ExecuteBatchDmlRequest::Representation
2163
- command.request_object = execute_batch_dml_request_object
2164
- command.response_representation = Google::Apis::SpannerV1::ExecuteBatchDmlResponse::Representation
2165
- command.response_class = Google::Apis::SpannerV1::ExecuteBatchDmlResponse
2166
- command.params['session'] = session unless session.nil?
3465
+ def list_project_instance_single_instance_partition_operations(parent, filter: nil, instance_partition_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3466
+ command = make_simple_command(:get, 'v1/{+parent}/instancePartitionOperations', options)
3467
+ command.response_representation = Google::Apis::SpannerV1::ListInstancePartitionOperationsResponse::Representation
3468
+ command.response_class = Google::Apis::SpannerV1::ListInstancePartitionOperationsResponse
3469
+ command.params['parent'] = parent unless parent.nil?
3470
+ command.query['filter'] = filter unless filter.nil?
3471
+ command.query['instancePartitionDeadline'] = instance_partition_deadline unless instance_partition_deadline.nil?
3472
+ command.query['pageSize'] = page_size unless page_size.nil?
3473
+ command.query['pageToken'] = page_token unless page_token.nil?
2167
3474
  command.query['fields'] = fields unless fields.nil?
2168
3475
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2169
3476
  execute_or_queue_command(command, &block)
2170
3477
  end
2171
3478
 
2172
- # Executes an SQL statement, returning all results in a single reply. This
2173
- # method cannot be used to return a result set larger than 10 MiB; if the query
2174
- # yields more data than that, the query fails with a `FAILED_PRECONDITION` error.
2175
- # Operations inside read-write transactions might return `ABORTED`. If this
2176
- # occurs, the application should restart the transaction from the beginning. See
2177
- # Transaction for more details. Larger result sets can be fetched in streaming
2178
- # fashion by calling ExecuteStreamingSql instead.
2179
- # @param [String] session
2180
- # Required. The session in which the SQL query should be performed.
2181
- # @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object
3479
+ # Creates an instance partition and begins preparing it to be used. The returned
3480
+ # long-running operation can be used to track the progress of preparing the new
3481
+ # instance partition. The instance partition name is assigned by the caller. If
3482
+ # the named instance partition already exists, `CreateInstancePartition` returns
3483
+ # `ALREADY_EXISTS`. Immediately upon completion of this request: * The instance
3484
+ # partition is readable via the API, with all requested attributes but no
3485
+ # allocated resources. Its state is `CREATING`. Until completion of the returned
3486
+ # operation: * Cancelling the operation renders the instance partition
3487
+ # immediately unreadable via the API. * The instance partition can be deleted. *
3488
+ # All other attempts to modify the instance partition are rejected. Upon
3489
+ # completion of the returned operation: * Billing for all successfully-allocated
3490
+ # resources begins (some types may have lower than the requested levels). *
3491
+ # Databases can start using this instance partition. * The instance partition's
3492
+ # allocated resource levels are readable via the API. * The instance partition's
3493
+ # state becomes `READY`. The returned long-running operation will have a name of
3494
+ # the format `/operations/` and can be used to track creation of the instance
3495
+ # partition. The metadata field type is CreateInstancePartitionMetadata. The
3496
+ # response field type is InstancePartition, if successful.
3497
+ # @param [String] parent
3498
+ # Required. The name of the instance in which to create the instance partition.
3499
+ # Values are of the form `projects//instances/`.
3500
+ # @param [Google::Apis::SpannerV1::CreateInstancePartitionRequest] create_instance_partition_request_object
2182
3501
  # @param [String] fields
2183
3502
  # Selector specifying which fields to include in a partial response.
2184
3503
  # @param [String] quota_user
@@ -2188,33 +3507,39 @@ module Google
2188
3507
  # Request-specific options
2189
3508
  #
2190
3509
  # @yield [result, err] Result & error if block supplied
2191
- # @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
3510
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
2192
3511
  # @yieldparam err [StandardError] error object if request failed
2193
3512
  #
2194
- # @return [Google::Apis::SpannerV1::ResultSet]
3513
+ # @return [Google::Apis::SpannerV1::Operation]
2195
3514
  #
2196
3515
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2197
3516
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2198
3517
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2199
- def execute_session_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2200
- command = make_simple_command(:post, 'v1/{+session}:executeSql', options)
2201
- command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation
2202
- command.request_object = execute_sql_request_object
2203
- command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
2204
- command.response_class = Google::Apis::SpannerV1::ResultSet
2205
- command.params['session'] = session unless session.nil?
3518
+ def create_instance_partition(parent, create_instance_partition_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3519
+ command = make_simple_command(:post, 'v1/{+parent}/instancePartitions', options)
3520
+ command.request_representation = Google::Apis::SpannerV1::CreateInstancePartitionRequest::Representation
3521
+ command.request_object = create_instance_partition_request_object
3522
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
3523
+ command.response_class = Google::Apis::SpannerV1::Operation
3524
+ command.params['parent'] = parent unless parent.nil?
2206
3525
  command.query['fields'] = fields unless fields.nil?
2207
3526
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2208
3527
  execute_or_queue_command(command, &block)
2209
3528
  end
2210
3529
 
2211
- # Like ExecuteSql, except returns the result set as a stream. Unlike ExecuteSql,
2212
- # there is no limit on the size of the returned result set. However, no
2213
- # individual row in the result set can exceed 100 MiB, and no column value can
2214
- # exceed 10 MiB.
2215
- # @param [String] session
2216
- # Required. The session in which the SQL query should be performed.
2217
- # @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object
3530
+ # Deletes an existing instance partition. Requires that the instance partition
3531
+ # is not used by any database or backup and is not the default instance
3532
+ # partition of an instance. Authorization requires `spanner.instancePartitions.
3533
+ # delete` permission on the resource name.
3534
+ # @param [String] name
3535
+ # Required. The name of the instance partition to be deleted. Values are of the
3536
+ # form `projects/`project`/instances/`instance`/instancePartitions/`
3537
+ # instance_partition``
3538
+ # @param [String] etag
3539
+ # Optional. If not empty, the API only deletes the instance partition when the
3540
+ # etag provided matches the current status of the requested instance partition.
3541
+ # Otherwise, deletes the instance partition without checking the current status
3542
+ # of the requested instance partition.
2218
3543
  # @param [String] fields
2219
3544
  # Selector specifying which fields to include in a partial response.
2220
3545
  # @param [String] quota_user
@@ -2224,30 +3549,30 @@ module Google
2224
3549
  # Request-specific options
2225
3550
  #
2226
3551
  # @yield [result, err] Result & error if block supplied
2227
- # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
3552
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
2228
3553
  # @yieldparam err [StandardError] error object if request failed
2229
3554
  #
2230
- # @return [Google::Apis::SpannerV1::PartialResultSet]
3555
+ # @return [Google::Apis::SpannerV1::Empty]
2231
3556
  #
2232
3557
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2233
3558
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2234
3559
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2235
- def execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2236
- command = make_simple_command(:post, 'v1/{+session}:executeStreamingSql', options)
2237
- command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation
2238
- command.request_object = execute_sql_request_object
2239
- command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
2240
- command.response_class = Google::Apis::SpannerV1::PartialResultSet
2241
- command.params['session'] = session unless session.nil?
3560
+ def delete_project_instance_instance_partition(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block)
3561
+ command = make_simple_command(:delete, 'v1/{+name}', options)
3562
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
3563
+ command.response_class = Google::Apis::SpannerV1::Empty
3564
+ command.params['name'] = name unless name.nil?
3565
+ command.query['etag'] = etag unless etag.nil?
2242
3566
  command.query['fields'] = fields unless fields.nil?
2243
3567
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2244
3568
  execute_or_queue_command(command, &block)
2245
3569
  end
2246
3570
 
2247
- # Gets a session. Returns `NOT_FOUND` if the session does not exist. This is
2248
- # mainly useful for determining whether a session is still alive.
3571
+ # Gets information about a particular instance partition.
2249
3572
  # @param [String] name
2250
- # Required. The name of the session to retrieve.
3573
+ # Required. The name of the requested instance partition. Values are of the form
3574
+ # `projects/`project`/instances/`instance`/instancePartitions/`
3575
+ # instance_partition``.
2251
3576
  # @param [String] fields
2252
3577
  # Selector specifying which fields to include in a partial response.
2253
3578
  # @param [String] quota_user
@@ -2257,39 +3582,40 @@ module Google
2257
3582
  # Request-specific options
2258
3583
  #
2259
3584
  # @yield [result, err] Result & error if block supplied
2260
- # @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object
3585
+ # @yieldparam result [Google::Apis::SpannerV1::InstancePartition] parsed result object
2261
3586
  # @yieldparam err [StandardError] error object if request failed
2262
3587
  #
2263
- # @return [Google::Apis::SpannerV1::Session]
3588
+ # @return [Google::Apis::SpannerV1::InstancePartition]
2264
3589
  #
2265
3590
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2266
3591
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2267
3592
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2268
- def get_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block)
3593
+ def get_project_instance_instance_partition(name, fields: nil, quota_user: nil, options: nil, &block)
2269
3594
  command = make_simple_command(:get, 'v1/{+name}', options)
2270
- command.response_representation = Google::Apis::SpannerV1::Session::Representation
2271
- command.response_class = Google::Apis::SpannerV1::Session
3595
+ command.response_representation = Google::Apis::SpannerV1::InstancePartition::Representation
3596
+ command.response_class = Google::Apis::SpannerV1::InstancePartition
2272
3597
  command.params['name'] = name unless name.nil?
2273
3598
  command.query['fields'] = fields unless fields.nil?
2274
3599
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2275
3600
  execute_or_queue_command(command, &block)
2276
3601
  end
2277
3602
 
2278
- # Lists all sessions in a given database.
2279
- # @param [String] database
2280
- # Required. The database in which to list sessions.
2281
- # @param [String] filter
2282
- # An expression for filtering the results of the request. Filter rules are case
2283
- # insensitive. The fields eligible for filtering are: * `labels.key` where key
2284
- # is the name of a label Some examples of using filters are: * `labels.env:*` -->
2285
- # The session has the label "env". * `labels.env:dev` --> The session has the
2286
- # label "env" and the value of the label contains the string "dev".
3603
+ # Lists all instance partitions for the given instance.
3604
+ # @param [String] parent
3605
+ # Required. The instance whose instance partitions should be listed. Values are
3606
+ # of the form `projects//instances/`. Use ``instance` = '-'` to list instance
3607
+ # partitions for all Instances in a project, e.g., `projects/myproject/instances/
3608
+ # -`.
3609
+ # @param [String] instance_partition_deadline
3610
+ # Optional. Deadline used while retrieving metadata for instance partitions.
3611
+ # Instance partitions whose metadata cannot be retrieved within this deadline
3612
+ # will be added to unreachable in ListInstancePartitionsResponse.
2287
3613
  # @param [Fixnum] page_size
2288
- # Number of sessions to be returned in the response. If 0 or less, defaults to
2289
- # the server's maximum allowed page size.
3614
+ # Number of instance partitions to be returned in the response. If 0 or less,
3615
+ # defaults to the server's maximum allowed page size.
2290
3616
  # @param [String] page_token
2291
3617
  # If non-empty, `page_token` should contain a next_page_token from a previous
2292
- # ListSessionsResponse.
3618
+ # ListInstancePartitionsResponse.
2293
3619
  # @param [String] fields
2294
3620
  # Selector specifying which fields to include in a partial response.
2295
3621
  # @param [String] quota_user
@@ -2299,20 +3625,20 @@ module Google
2299
3625
  # Request-specific options
2300
3626
  #
2301
3627
  # @yield [result, err] Result & error if block supplied
2302
- # @yieldparam result [Google::Apis::SpannerV1::ListSessionsResponse] parsed result object
3628
+ # @yieldparam result [Google::Apis::SpannerV1::ListInstancePartitionsResponse] parsed result object
2303
3629
  # @yieldparam err [StandardError] error object if request failed
2304
3630
  #
2305
- # @return [Google::Apis::SpannerV1::ListSessionsResponse]
3631
+ # @return [Google::Apis::SpannerV1::ListInstancePartitionsResponse]
2306
3632
  #
2307
3633
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2308
3634
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2309
3635
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2310
- def list_project_instance_database_sessions(database, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2311
- command = make_simple_command(:get, 'v1/{+database}/sessions', options)
2312
- command.response_representation = Google::Apis::SpannerV1::ListSessionsResponse::Representation
2313
- command.response_class = Google::Apis::SpannerV1::ListSessionsResponse
2314
- command.params['database'] = database unless database.nil?
2315
- command.query['filter'] = filter unless filter.nil?
3636
+ def list_project_instance_instance_partitions(parent, instance_partition_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3637
+ command = make_simple_command(:get, 'v1/{+parent}/instancePartitions', options)
3638
+ command.response_representation = Google::Apis::SpannerV1::ListInstancePartitionsResponse::Representation
3639
+ command.response_class = Google::Apis::SpannerV1::ListInstancePartitionsResponse
3640
+ command.params['parent'] = parent unless parent.nil?
3641
+ command.query['instancePartitionDeadline'] = instance_partition_deadline unless instance_partition_deadline.nil?
2316
3642
  command.query['pageSize'] = page_size unless page_size.nil?
2317
3643
  command.query['pageToken'] = page_token unless page_token.nil?
2318
3644
  command.query['fields'] = fields unless fields.nil?
@@ -2320,18 +3646,33 @@ module Google
2320
3646
  execute_or_queue_command(command, &block)
2321
3647
  end
2322
3648
 
2323
- # Creates a set of partition tokens that can be used to execute a query
2324
- # operation in parallel. Each of the returned partition tokens can be used by
2325
- # ExecuteStreamingSql to specify a subset of the query result to read. The same
2326
- # session and read-only transaction must be used by the PartitionQueryRequest
2327
- # used to create the partition tokens and the ExecuteSqlRequests that use the
2328
- # partition tokens. Partition tokens become invalid when the session used to
2329
- # create them is deleted, is idle for too long, begins a new transaction, or
2330
- # becomes too old. When any of these happen, it is not possible to resume the
2331
- # query, and the whole operation must be restarted from the beginning.
2332
- # @param [String] session
2333
- # Required. The session used to create the partitions.
2334
- # @param [Google::Apis::SpannerV1::PartitionQueryRequest] partition_query_request_object
3649
+ # Updates an instance partition, and begins allocating or releasing resources as
3650
+ # requested. The returned long-running operation can be used to track the
3651
+ # progress of updating the instance partition. If the named instance partition
3652
+ # does not exist, returns `NOT_FOUND`. Immediately upon completion of this
3653
+ # request: * For resource types for which a decrease in the instance partition's
3654
+ # allocation has been requested, billing is based on the newly-requested level.
3655
+ # Until completion of the returned operation: * Cancelling the operation sets
3656
+ # its metadata's cancel_time, and begins restoring resources to their pre-
3657
+ # request values. The operation is guaranteed to succeed at undoing all resource
3658
+ # changes, after which point it terminates with a `CANCELLED` status. * All
3659
+ # other attempts to modify the instance partition are rejected. * Reading the
3660
+ # instance partition via the API continues to give the pre-request resource
3661
+ # levels. Upon completion of the returned operation: * Billing begins for all
3662
+ # successfully-allocated resources (some types may have lower than the requested
3663
+ # levels). * All newly-reserved resources are available for serving the instance
3664
+ # partition's tables. * The instance partition's new resource levels are
3665
+ # readable via the API. The returned long-running operation will have a name of
3666
+ # the format `/operations/` and can be used to track the instance partition
3667
+ # modification. The metadata field type is UpdateInstancePartitionMetadata. The
3668
+ # response field type is InstancePartition, if successful. Authorization
3669
+ # requires `spanner.instancePartitions.update` permission on the resource name.
3670
+ # @param [String] name
3671
+ # Required. A unique identifier for the instance partition. Values are of the
3672
+ # form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment
3673
+ # of the name must be between 2 and 64 characters in length. An instance
3674
+ # partition's name cannot be changed after the instance partition is created.
3675
+ # @param [Google::Apis::SpannerV1::UpdateInstancePartitionRequest] update_instance_partition_request_object
2335
3676
  # @param [String] fields
2336
3677
  # Selector specifying which fields to include in a partial response.
2337
3678
  # @param [String] quota_user
@@ -2341,40 +3682,36 @@ module Google
2341
3682
  # Request-specific options
2342
3683
  #
2343
3684
  # @yield [result, err] Result & error if block supplied
2344
- # @yieldparam result [Google::Apis::SpannerV1::PartitionResponse] parsed result object
3685
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
2345
3686
  # @yieldparam err [StandardError] error object if request failed
2346
3687
  #
2347
- # @return [Google::Apis::SpannerV1::PartitionResponse]
3688
+ # @return [Google::Apis::SpannerV1::Operation]
2348
3689
  #
2349
3690
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2350
3691
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2351
3692
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2352
- def partition_session_query(session, partition_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2353
- command = make_simple_command(:post, 'v1/{+session}:partitionQuery', options)
2354
- command.request_representation = Google::Apis::SpannerV1::PartitionQueryRequest::Representation
2355
- command.request_object = partition_query_request_object
2356
- command.response_representation = Google::Apis::SpannerV1::PartitionResponse::Representation
2357
- command.response_class = Google::Apis::SpannerV1::PartitionResponse
2358
- command.params['session'] = session unless session.nil?
3693
+ def patch_project_instance_instance_partition(name, update_instance_partition_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3694
+ command = make_simple_command(:patch, 'v1/{+name}', options)
3695
+ command.request_representation = Google::Apis::SpannerV1::UpdateInstancePartitionRequest::Representation
3696
+ command.request_object = update_instance_partition_request_object
3697
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
3698
+ command.response_class = Google::Apis::SpannerV1::Operation
3699
+ command.params['name'] = name unless name.nil?
2359
3700
  command.query['fields'] = fields unless fields.nil?
2360
3701
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2361
3702
  execute_or_queue_command(command, &block)
2362
3703
  end
2363
3704
 
2364
- # Creates a set of partition tokens that can be used to execute a read operation
2365
- # in parallel. Each of the returned partition tokens can be used by
2366
- # StreamingRead to specify a subset of the read result to read. The same session
2367
- # and read-only transaction must be used by the PartitionReadRequest used to
2368
- # create the partition tokens and the ReadRequests that use the partition tokens.
2369
- # There are no ordering guarantees on rows returned among the returned
2370
- # partition tokens, or even within each individual StreamingRead call issued
2371
- # with a partition_token. Partition tokens become invalid when the session used
2372
- # to create them is deleted, is idle for too long, begins a new transaction, or
2373
- # becomes too old. When any of these happen, it is not possible to resume the
2374
- # read, and the whole operation must be restarted from the beginning.
2375
- # @param [String] session
2376
- # Required. The session used to create the partitions.
2377
- # @param [Google::Apis::SpannerV1::PartitionReadRequest] partition_read_request_object
3705
+ # Starts asynchronous cancellation on a long-running operation. The server makes
3706
+ # a best effort to cancel the operation, but success is not guaranteed. If the
3707
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
3708
+ # Clients can use Operations.GetOperation or other methods to check whether the
3709
+ # cancellation succeeded or whether the operation completed despite cancellation.
3710
+ # On successful cancellation, the operation is not deleted; instead, it becomes
3711
+ # an operation with an Operation.error value with a google.rpc.Status.code of `1`
3712
+ # , corresponding to `Code.CANCELLED`.
3713
+ # @param [String] name
3714
+ # The name of the operation resource to be cancelled.
2378
3715
  # @param [String] fields
2379
3716
  # Selector specifying which fields to include in a partial response.
2380
3717
  # @param [String] quota_user
@@ -2384,37 +3721,30 @@ module Google
2384
3721
  # Request-specific options
2385
3722
  #
2386
3723
  # @yield [result, err] Result & error if block supplied
2387
- # @yieldparam result [Google::Apis::SpannerV1::PartitionResponse] parsed result object
3724
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
2388
3725
  # @yieldparam err [StandardError] error object if request failed
2389
3726
  #
2390
- # @return [Google::Apis::SpannerV1::PartitionResponse]
3727
+ # @return [Google::Apis::SpannerV1::Empty]
2391
3728
  #
2392
3729
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2393
3730
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2394
3731
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2395
- def partition_session_read(session, partition_read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2396
- command = make_simple_command(:post, 'v1/{+session}:partitionRead', options)
2397
- command.request_representation = Google::Apis::SpannerV1::PartitionReadRequest::Representation
2398
- command.request_object = partition_read_request_object
2399
- command.response_representation = Google::Apis::SpannerV1::PartitionResponse::Representation
2400
- command.response_class = Google::Apis::SpannerV1::PartitionResponse
2401
- command.params['session'] = session unless session.nil?
3732
+ def cancel_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil, &block)
3733
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
3734
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
3735
+ command.response_class = Google::Apis::SpannerV1::Empty
3736
+ command.params['name'] = name unless name.nil?
2402
3737
  command.query['fields'] = fields unless fields.nil?
2403
3738
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2404
3739
  execute_or_queue_command(command, &block)
2405
3740
  end
2406
3741
 
2407
- # Reads rows from the database using key lookups and scans, as a simple key/
2408
- # value style alternative to ExecuteSql. This method cannot be used to return a
2409
- # result set larger than 10 MiB; if the read matches more data than that, the
2410
- # read fails with a `FAILED_PRECONDITION` error. Reads inside read-write
2411
- # transactions might return `ABORTED`. If this occurs, the application should
2412
- # restart the transaction from the beginning. See Transaction for more details.
2413
- # Larger result sets can be yielded in streaming fashion by calling
2414
- # StreamingRead instead.
2415
- # @param [String] session
2416
- # Required. The session in which the read should be performed.
2417
- # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
3742
+ # Deletes a long-running operation. This method indicates that the client is no
3743
+ # longer interested in the operation result. It does not cancel the operation.
3744
+ # If the server doesn't support this method, it returns `google.rpc.Code.
3745
+ # UNIMPLEMENTED`.
3746
+ # @param [String] name
3747
+ # The name of the operation resource to be deleted.
2418
3748
  # @param [String] fields
2419
3749
  # Selector specifying which fields to include in a partial response.
2420
3750
  # @param [String] quota_user
@@ -2424,34 +3754,28 @@ module Google
2424
3754
  # Request-specific options
2425
3755
  #
2426
3756
  # @yield [result, err] Result & error if block supplied
2427
- # @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
3757
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
2428
3758
  # @yieldparam err [StandardError] error object if request failed
2429
3759
  #
2430
- # @return [Google::Apis::SpannerV1::ResultSet]
3760
+ # @return [Google::Apis::SpannerV1::Empty]
2431
3761
  #
2432
3762
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2433
3763
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2434
3764
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2435
- def read_session(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2436
- command = make_simple_command(:post, 'v1/{+session}:read', options)
2437
- command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
2438
- command.request_object = read_request_object
2439
- command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
2440
- command.response_class = Google::Apis::SpannerV1::ResultSet
2441
- command.params['session'] = session unless session.nil?
3765
+ def delete_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil, &block)
3766
+ command = make_simple_command(:delete, 'v1/{+name}', options)
3767
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
3768
+ command.response_class = Google::Apis::SpannerV1::Empty
3769
+ command.params['name'] = name unless name.nil?
2442
3770
  command.query['fields'] = fields unless fields.nil?
2443
3771
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2444
3772
  execute_or_queue_command(command, &block)
2445
3773
  end
2446
3774
 
2447
- # Rolls back a transaction, releasing any locks it holds. It is a good idea to
2448
- # call this for any transaction that includes one or more Read or ExecuteSql
2449
- # requests and ultimately decides not to commit. `Rollback` returns `OK` if it
2450
- # successfully aborts the transaction, the transaction was already aborted, or
2451
- # the transaction is not found. `Rollback` never returns `ABORTED`.
2452
- # @param [String] session
2453
- # Required. The session in which the transaction to roll back is running.
2454
- # @param [Google::Apis::SpannerV1::RollbackRequest] rollback_request_object
3775
+ # Gets the latest state of a long-running operation. Clients can use this method
3776
+ # to poll the operation result at intervals as recommended by the API service.
3777
+ # @param [String] name
3778
+ # The name of the operation resource.
2455
3779
  # @param [String] fields
2456
3780
  # Selector specifying which fields to include in a partial response.
2457
3781
  # @param [String] quota_user
@@ -2461,32 +3785,34 @@ module Google
2461
3785
  # Request-specific options
2462
3786
  #
2463
3787
  # @yield [result, err] Result & error if block supplied
2464
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
3788
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
2465
3789
  # @yieldparam err [StandardError] error object if request failed
2466
3790
  #
2467
- # @return [Google::Apis::SpannerV1::Empty]
3791
+ # @return [Google::Apis::SpannerV1::Operation]
2468
3792
  #
2469
3793
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2470
3794
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2471
3795
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2472
- def rollback_session(session, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2473
- command = make_simple_command(:post, 'v1/{+session}:rollback', options)
2474
- command.request_representation = Google::Apis::SpannerV1::RollbackRequest::Representation
2475
- command.request_object = rollback_request_object
2476
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
2477
- command.response_class = Google::Apis::SpannerV1::Empty
2478
- command.params['session'] = session unless session.nil?
3796
+ def get_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil, &block)
3797
+ command = make_simple_command(:get, 'v1/{+name}', options)
3798
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
3799
+ command.response_class = Google::Apis::SpannerV1::Operation
3800
+ command.params['name'] = name unless name.nil?
2479
3801
  command.query['fields'] = fields unless fields.nil?
2480
3802
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2481
3803
  execute_or_queue_command(command, &block)
2482
3804
  end
2483
3805
 
2484
- # Like Read, except returns the result set as a stream. Unlike Read, there is no
2485
- # limit on the size of the returned result set. However, no individual row in
2486
- # the result set can exceed 100 MiB, and no column value can exceed 10 MiB.
2487
- # @param [String] session
2488
- # Required. The session in which the read should be performed.
2489
- # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
3806
+ # Lists operations that match the specified filter in the request. If the server
3807
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
3808
+ # @param [String] name
3809
+ # The name of the operation's parent resource.
3810
+ # @param [String] filter
3811
+ # The standard list filter.
3812
+ # @param [Fixnum] page_size
3813
+ # The standard list page size.
3814
+ # @param [String] page_token
3815
+ # The standard list page token.
2490
3816
  # @param [String] fields
2491
3817
  # Selector specifying which fields to include in a partial response.
2492
3818
  # @param [String] quota_user
@@ -2496,21 +3822,22 @@ module Google
2496
3822
  # Request-specific options
2497
3823
  #
2498
3824
  # @yield [result, err] Result & error if block supplied
2499
- # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
3825
+ # @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object
2500
3826
  # @yieldparam err [StandardError] error object if request failed
2501
3827
  #
2502
- # @return [Google::Apis::SpannerV1::PartialResultSet]
3828
+ # @return [Google::Apis::SpannerV1::ListOperationsResponse]
2503
3829
  #
2504
3830
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2505
3831
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2506
3832
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2507
- def streaming_project_instance_database_session_read(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2508
- command = make_simple_command(:post, 'v1/{+session}:streamingRead', options)
2509
- command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
2510
- command.request_object = read_request_object
2511
- command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
2512
- command.response_class = Google::Apis::SpannerV1::PartialResultSet
2513
- command.params['session'] = session unless session.nil?
3833
+ def list_project_instance_instance_partition_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3834
+ command = make_simple_command(:get, 'v1/{+name}', options)
3835
+ command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
3836
+ command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
3837
+ command.params['name'] = name unless name.nil?
3838
+ command.query['filter'] = filter unless filter.nil?
3839
+ command.query['pageSize'] = page_size unless page_size.nil?
3840
+ command.query['pageToken'] = page_token unless page_token.nil?
2514
3841
  command.query['fields'] = fields unless fields.nil?
2515
3842
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2516
3843
  execute_or_queue_command(command, &block)
@@ -2522,8 +3849,8 @@ module Google
2522
3849
  # Clients can use Operations.GetOperation or other methods to check whether the
2523
3850
  # cancellation succeeded or whether the operation completed despite cancellation.
2524
3851
  # On successful cancellation, the operation is not deleted; instead, it becomes
2525
- # an operation with an Operation.error value with a google.rpc.Status.code of 1,
2526
- # corresponding to `Code.CANCELLED`.
3852
+ # an operation with an Operation.error value with a google.rpc.Status.code of `1`
3853
+ # , corresponding to `Code.CANCELLED`.
2527
3854
  # @param [String] name
2528
3855
  # The name of the operation resource to be cancelled.
2529
3856
  # @param [String] fields
@@ -2618,13 +3945,7 @@ module Google
2618
3945
  end
2619
3946
 
2620
3947
  # Lists operations that match the specified filter in the request. If the server
2621
- # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
2622
- # binding allows API services to override the binding to use different resource
2623
- # name schemes, such as `users/*/operations`. To override the binding, API
2624
- # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
2625
- # service configuration. For backwards compatibility, the default name includes
2626
- # the operations collection id, however overriding users must ensure the name
2627
- # binding is the parent resource, without the operations collection id.
3948
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
2628
3949
  # @param [String] name
2629
3950
  # The name of the operation's parent resource.
2630
3951
  # @param [String] filter