google-api-client 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/MIGRATING.md +22 -7
- data/README.md +4 -8
- data/api_names.yaml +1210 -37815
- data/generated/google/apis/acceleratedmobilepageurl_v1.rb +32 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +144 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +86 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +90 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +764 -764
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +180 -180
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +421 -421
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +1 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +1 -0
- data/generated/google/apis/admin_reports_v1.rb +1 -1
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +187 -187
- data/generated/google/apis/analyticsreporting_v4/representations.rb +42 -42
- data/generated/google/apis/appengine_v1.rb +40 -0
- data/generated/google/apis/appengine_v1/classes.rb +2251 -0
- data/generated/google/apis/appengine_v1/representations.rb +858 -0
- data/generated/google/apis/appengine_v1/service.rb +894 -0
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +11 -6
- data/generated/google/apis/books_v1.rb +1 -1
- data/generated/google/apis/books_v1/classes.rb +26 -0
- data/generated/google/apis/books_v1/representations.rb +15 -0
- data/generated/google/apis/books_v1/service.rb +4 -1
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +638 -637
- data/generated/google/apis/cloudbuild_v1/representations.rb +110 -110
- data/generated/google/apis/cloudbuild_v1/service.rb +139 -139
- data/generated/google/apis/clouddebugger_v2.rb +3 -3
- data/generated/google/apis/clouddebugger_v2/classes.rb +131 -131
- data/generated/google/apis/clouddebugger_v2/representations.rb +25 -25
- data/generated/google/apis/clouderrorreporting_v1beta1.rb +36 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +590 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +252 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +350 -0
- data/generated/google/apis/cloudfunctions_v1.rb +35 -0
- data/generated/google/apis/cloudfunctions_v1/classes.rb +98 -0
- data/generated/google/apis/cloudfunctions_v1/representations.rb +57 -0
- data/generated/google/apis/cloudfunctions_v1/service.rb +89 -0
- data/generated/google/apis/cloudkms_v1/classes.rb +277 -270
- data/generated/google/apis/cloudkms_v1/representations.rb +73 -73
- data/generated/google/apis/cloudkms_v1/service.rb +194 -194
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1147 -1144
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +188 -188
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +513 -936
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +307 -916
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +63 -285
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +333 -681
- data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
- data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
- data/generated/google/apis/cloudtrace_v1/service.rb +16 -16
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +32 -7
- data/generated/google/apis/compute_beta/representations.rb +2 -0
- data/generated/google/apis/compute_beta/service.rb +11 -11
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +95 -2
- data/generated/google/apis/compute_v1/representations.rb +33 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +3333 -3333
- data/generated/google/apis/dataflow_v1b3/representations.rb +759 -759
- data/generated/google/apis/dataflow_v1b3/service.rb +154 -154
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +1097 -1097
- data/generated/google/apis/dataproc_v1/representations.rb +200 -200
- data/generated/google/apis/dataproc_v1/service.rb +356 -356
- data/generated/google/apis/datastore_v1.rb +4 -4
- data/generated/google/apis/datastore_v1/classes.rb +701 -690
- data/generated/google/apis/datastore_v1/representations.rb +160 -160
- data/generated/google/apis/datastore_v1/service.rb +52 -52
- data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +158 -35
- data/generated/google/apis/drive_v2/representations.rb +39 -0
- data/generated/google/apis/drive_v2/service.rb +4 -4
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +162 -33
- data/generated/google/apis/drive_v3/representations.rb +39 -0
- data/generated/google/apis/drive_v3/service.rb +4 -4
- data/generated/google/apis/firebasedynamiclinks_v1.rb +35 -0
- data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +466 -0
- data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +222 -0
- data/generated/google/apis/firebasedynamiclinks_v1/service.rb +95 -0
- data/generated/google/apis/firebaserules_v1.rb +41 -0
- data/generated/google/apis/firebaserules_v1/classes.rb +425 -0
- data/generated/google/apis/firebaserules_v1/representations.rb +222 -0
- data/generated/google/apis/firebaserules_v1/service.rb +495 -0
- data/generated/google/apis/games_v1/classes.rb +4 -0
- data/generated/google/apis/genomics_v1.rb +7 -7
- data/generated/google/apis/genomics_v1/classes.rb +2336 -2335
- data/generated/google/apis/genomics_v1/representations.rb +387 -387
- data/generated/google/apis/genomics_v1/service.rb +1187 -1187
- data/generated/google/apis/gmail_v1/classes.rb +3 -0
- data/generated/google/apis/iam_v1.rb +1 -1
- data/generated/google/apis/iam_v1/classes.rb +123 -117
- data/generated/google/apis/iam_v1/representations.rb +33 -33
- data/generated/google/apis/iam_v1/service.rb +109 -109
- data/generated/google/apis/identitytoolkit_v3/classes.rb +5 -0
- data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
- data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
- data/generated/google/apis/kgsearch_v1/service.rb +4 -4
- data/generated/google/apis/language_v1.rb +36 -0
- data/generated/google/apis/language_v1/classes.rb +757 -0
- data/generated/google/apis/language_v1/representations.rb +338 -0
- data/generated/google/apis/language_v1/service.rb +185 -0
- data/generated/google/apis/language_v1beta1/classes.rb +407 -407
- data/generated/google/apis/language_v1beta1/representations.rb +103 -103
- data/generated/google/apis/language_v1beta1/service.rb +45 -45
- data/generated/google/apis/logging_v2.rb +46 -0
- data/generated/google/apis/logging_v2/classes.rb +1271 -0
- data/generated/google/apis/logging_v2/representations.rb +421 -0
- data/generated/google/apis/logging_v2/service.rb +1569 -0
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +886 -886
- data/generated/google/apis/logging_v2beta1/representations.rb +132 -132
- data/generated/google/apis/logging_v2beta1/service.rb +235 -235
- data/generated/google/apis/manufacturers_v1/classes.rb +147 -147
- data/generated/google/apis/manufacturers_v1/representations.rb +29 -29
- data/generated/google/apis/ml_v1.rb +34 -0
- data/generated/google/apis/ml_v1/classes.rb +1617 -0
- data/generated/google/apis/ml_v1/representations.rb +498 -0
- data/generated/google/apis/ml_v1/service.rb +769 -0
- data/generated/google/apis/monitoring_v3.rb +4 -4
- data/generated/google/apis/monitoring_v3/classes.rb +630 -630
- data/generated/google/apis/monitoring_v3/representations.rb +134 -134
- data/generated/google/apis/monitoring_v3/service.rb +240 -240
- data/generated/google/apis/pagespeedonline_v2/classes.rb +1 -0
- data/generated/google/apis/partners_v2.rb +1 -1
- data/generated/google/apis/partners_v2/classes.rb +639 -639
- data/generated/google/apis/partners_v2/representations.rb +168 -168
- data/generated/google/apis/partners_v2/service.rb +381 -381
- data/generated/google/apis/people_v1.rb +10 -10
- data/generated/google/apis/people_v1/classes.rb +524 -524
- data/generated/google/apis/people_v1/representations.rb +143 -143
- data/generated/google/apis/people_v1/service.rb +30 -30
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +454 -444
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +90 -90
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +110 -110
- data/generated/google/apis/pubsub_v1/classes.rb +175 -173
- data/generated/google/apis/pubsub_v1/representations.rb +53 -53
- data/generated/google/apis/pubsub_v1/service.rb +210 -210
- data/generated/google/apis/replicapool_v1beta2/classes.rb +2 -0
- data/generated/google/apis/runtimeconfig_v1.rb +38 -0
- data/generated/google/apis/runtimeconfig_v1/classes.rb +252 -0
- data/generated/google/apis/runtimeconfig_v1/representations.rb +98 -0
- data/generated/google/apis/runtimeconfig_v1/service.rb +176 -0
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +6 -6
- data/generated/google/apis/script_v1/representations.rb +1 -1
- data/generated/google/apis/searchconsole_v1.rb +31 -0
- data/generated/google/apis/searchconsole_v1/classes.rb +205 -0
- data/generated/google/apis/searchconsole_v1/representations.rb +129 -0
- data/generated/google/apis/searchconsole_v1/service.rb +88 -0
- data/generated/google/apis/servicecontrol_v1.rb +38 -0
- data/generated/google/apis/servicecontrol_v1/classes.rb +1675 -0
- data/generated/google/apis/servicecontrol_v1/representations.rb +601 -0
- data/generated/google/apis/servicecontrol_v1/service.rb +337 -0
- data/generated/google/apis/servicemanagement_v1.rb +45 -0
- data/generated/google/apis/servicemanagement_v1/classes.rb +4934 -0
- data/generated/google/apis/servicemanagement_v1/representations.rb +1526 -0
- data/generated/google/apis/servicemanagement_v1/service.rb +860 -0
- data/generated/google/apis/serviceuser_v1.rb +42 -0
- data/generated/google/apis/serviceuser_v1/classes.rb +3746 -0
- data/generated/google/apis/serviceuser_v1/representations.rb +1041 -0
- data/generated/google/apis/serviceuser_v1/service.rb +214 -0
- data/generated/google/apis/sheets_v4.rb +3 -3
- data/generated/google/apis/sheets_v4/classes.rb +4390 -4390
- data/generated/google/apis/sheets_v4/representations.rb +381 -381
- data/generated/google/apis/sheets_v4/service.rb +48 -48
- data/generated/google/apis/slides_v1.rb +3 -3
- data/generated/google/apis/slides_v1/classes.rb +2860 -2860
- data/generated/google/apis/slides_v1/representations.rb +693 -693
- data/generated/google/apis/slides_v1/service.rb +30 -30
- data/generated/google/apis/sourcerepo_v1.rb +34 -0
- data/generated/google/apis/sourcerepo_v1/classes.rb +687 -0
- data/generated/google/apis/sourcerepo_v1/representations.rb +285 -0
- data/generated/google/apis/sourcerepo_v1/service.rb +291 -0
- data/generated/google/apis/spanner_v1.rb +35 -0
- data/generated/google/apis/spanner_v1/classes.rb +3294 -0
- data/generated/google/apis/spanner_v1/representations.rb +984 -0
- data/generated/google/apis/spanner_v1/service.rb +1504 -0
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +197 -196
- data/generated/google/apis/speech_v1beta1/representations.rb +53 -53
- data/generated/google/apis/speech_v1beta1/service.rb +27 -27
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +131 -0
- data/generated/google/apis/storage_v1/representations.rb +51 -0
- data/generated/google/apis/storage_v1/service.rb +182 -0
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +732 -661
- data/generated/google/apis/storagetransfer_v1/representations.rb +132 -132
- data/generated/google/apis/storagetransfer_v1/service.rb +174 -197
- data/generated/google/apis/surveys_v2.rb +40 -0
- data/generated/google/apis/surveys_v2/classes.rb +806 -0
- data/generated/google/apis/surveys_v2/representations.rb +347 -0
- data/generated/google/apis/surveys_v2/service.rb +477 -0
- data/generated/google/apis/tagmanager_v2.rb +52 -0
- data/generated/google/apis/tagmanager_v2/classes.rb +2435 -0
- data/generated/google/apis/tagmanager_v2/representations.rb +993 -0
- data/generated/google/apis/tagmanager_v2/service.rb +2865 -0
- data/generated/google/apis/toolresults_v1beta3.rb +34 -0
- data/generated/google/apis/toolresults_v1beta3/classes.rb +2160 -0
- data/generated/google/apis/toolresults_v1beta3/representations.rb +729 -0
- data/generated/google/apis/toolresults_v1beta3/service.rb +1236 -0
- data/generated/google/apis/tracing_v1.rb +40 -0
- data/generated/google/apis/tracing_v1/classes.rb +664 -0
- data/generated/google/apis/tracing_v1/representations.rb +279 -0
- data/generated/google/apis/tracing_v1/service.rb +225 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +1223 -1222
- data/generated/google/apis/vision_v1/representations.rb +234 -234
- data/generated/google/apis/vision_v1/service.rb +10 -10
- data/generated/google/apis/webfonts_v1.rb +33 -0
- data/generated/google/apis/webfonts_v1/classes.rb +113 -0
- data/generated/google/apis/webfonts_v1/representations.rb +62 -0
- data/generated/google/apis/webfonts_v1/service.rb +102 -0
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +31 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +6 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +41 -0
- data/generated/google/apis/youtube_v3/classes.rb +1 -0
- data/generated/google/apis/youtubereporting_v1.rb +4 -4
- data/generated/google/apis/youtubereporting_v1/classes.rb +76 -76
- data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
- data/generated/google/apis/youtubereporting_v1/service.rb +95 -95
- data/lib/google/apis/generator/annotator.rb +5 -4
- data/lib/google/apis/generator/templates/_class.tmpl +3 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/adsense.rb +99 -0
- data/samples/cli/lib/samples/analytics.rb +18 -0
- data/samples/cli/lib/samples/gmail.rb +33 -0
- data/samples/cli/lib/samples/vision.rb +69 -0
- metadata +89 -4
- data/sync.rb +0 -71
@@ -0,0 +1,1504 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module SpannerV1
|
23
|
+
# Cloud Spanner API
|
24
|
+
#
|
25
|
+
# Cloud Spanner is a managed, mission-critical, globally consistent and scalable
|
26
|
+
# relational database service.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/spanner_v1'
|
30
|
+
#
|
31
|
+
# Spanner = Google::Apis::SpannerV1 # Alias the module
|
32
|
+
# service = Spanner::SpannerService.new
|
33
|
+
#
|
34
|
+
# @see https://cloud.google.com/spanner/
|
35
|
+
class SpannerService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
super('https://spanner.googleapis.com/', '')
|
48
|
+
end
|
49
|
+
|
50
|
+
# Deletes an instance.
|
51
|
+
# Immediately upon completion of the request:
|
52
|
+
# * Billing ceases for all of the instance's reserved resources.
|
53
|
+
# Soon afterward:
|
54
|
+
# * The instance and *all of its databases* immediately and
|
55
|
+
# irrevocably disappear from the API. All data in the databases
|
56
|
+
# is permanently deleted.
|
57
|
+
# @param [String] name
|
58
|
+
# Required. The name of the instance to be deleted. Values are of the form
|
59
|
+
# `projects/<project>/instances/<instance>`
|
60
|
+
# @param [String] fields
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
62
|
+
# @param [String] quota_user
|
63
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
64
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
65
|
+
# @param [Google::Apis::RequestOptions] options
|
66
|
+
# Request-specific options
|
67
|
+
#
|
68
|
+
# @yield [result, err] Result & error if block supplied
|
69
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
70
|
+
# @yieldparam err [StandardError] error object if request failed
|
71
|
+
#
|
72
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
73
|
+
#
|
74
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
75
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
76
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
77
|
+
def delete_project_instance(name, fields: nil, quota_user: nil, options: nil, &block)
|
78
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
79
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
80
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
81
|
+
command.params['name'] = name unless name.nil?
|
82
|
+
command.query['fields'] = fields unless fields.nil?
|
83
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
84
|
+
execute_or_queue_command(command, &block)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Lists all instances in the given project.
|
88
|
+
# @param [String] parent
|
89
|
+
# Required. The name of the project for which a list of instances is
|
90
|
+
# requested. Values are of the form `projects/<project>`.
|
91
|
+
# @param [String] filter
|
92
|
+
# An expression for filtering the results of the request. Filter rules are
|
93
|
+
# case insensitive. The fields eligible for filtering are:
|
94
|
+
# * name
|
95
|
+
# * display_name
|
96
|
+
# * labels.key where key is the name of a label
|
97
|
+
# Some examples of using filters are:
|
98
|
+
# * name:* --> The instance has a name.
|
99
|
+
# * name:Howl --> The instance's name contains the string "howl".
|
100
|
+
# * name:HOWL --> Equivalent to above.
|
101
|
+
# * NAME:howl --> Equivalent to above.
|
102
|
+
# * labels.env:* --> The instance has the label "env".
|
103
|
+
# * labels.env:dev --> The instance has the label "env" and the value of
|
104
|
+
# the label contains the string "dev".
|
105
|
+
# * name:howl labels.env:dev --> The instance's name contains "howl" and
|
106
|
+
# it has the label "env" with its value
|
107
|
+
# containing "dev".
|
108
|
+
# @param [String] page_token
|
109
|
+
# If non-empty, `page_token` should contain a
|
110
|
+
# next_page_token from a
|
111
|
+
# previous ListInstancesResponse.
|
112
|
+
# @param [Fixnum] page_size
|
113
|
+
# Number of instances to be returned in the response. If 0 or less, defaults
|
114
|
+
# to the server's maximum allowed page size.
|
115
|
+
# @param [String] fields
|
116
|
+
# Selector specifying which fields to include in a partial response.
|
117
|
+
# @param [String] quota_user
|
118
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
119
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
120
|
+
# @param [Google::Apis::RequestOptions] options
|
121
|
+
# Request-specific options
|
122
|
+
#
|
123
|
+
# @yield [result, err] Result & error if block supplied
|
124
|
+
# @yieldparam result [Google::Apis::SpannerV1::ListInstancesResponse] parsed result object
|
125
|
+
# @yieldparam err [StandardError] error object if request failed
|
126
|
+
#
|
127
|
+
# @return [Google::Apis::SpannerV1::ListInstancesResponse]
|
128
|
+
#
|
129
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
130
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
131
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
132
|
+
def list_project_instances(parent, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
133
|
+
command = make_simple_command(:get, 'v1/{+parent}/instances', options)
|
134
|
+
command.response_representation = Google::Apis::SpannerV1::ListInstancesResponse::Representation
|
135
|
+
command.response_class = Google::Apis::SpannerV1::ListInstancesResponse
|
136
|
+
command.params['parent'] = parent unless parent.nil?
|
137
|
+
command.query['filter'] = filter unless filter.nil?
|
138
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
139
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
140
|
+
command.query['fields'] = fields unless fields.nil?
|
141
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
142
|
+
execute_or_queue_command(command, &block)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Creates an instance and begins preparing it to begin serving. The
|
146
|
+
# returned long-running operation
|
147
|
+
# can be used to track the progress of preparing the new
|
148
|
+
# instance. The instance name is assigned by the caller. If the
|
149
|
+
# named instance already exists, `CreateInstance` returns
|
150
|
+
# `ALREADY_EXISTS`.
|
151
|
+
# Immediately upon completion of this request:
|
152
|
+
# * The instance is readable via the API, with all requested attributes
|
153
|
+
# but no allocated resources. Its state is `CREATING`.
|
154
|
+
# Until completion of the returned operation:
|
155
|
+
# * Cancelling the operation renders the instance immediately unreadable
|
156
|
+
# via the API.
|
157
|
+
# * The instance can be deleted.
|
158
|
+
# * All other attempts to modify the instance are rejected.
|
159
|
+
# Upon completion of the returned operation:
|
160
|
+
# * Billing for all successfully-allocated resources begins (some types
|
161
|
+
# may have lower than the requested levels).
|
162
|
+
# * Databases can be created in the instance.
|
163
|
+
# * The instance's allocated resource levels are readable via the API.
|
164
|
+
# * The instance's state becomes `READY`.
|
165
|
+
# The returned long-running operation will
|
166
|
+
# have a name of the format `<instance_name>/operations/<operation_id>` and
|
167
|
+
# can be used to track creation of the instance. The
|
168
|
+
# metadata field type is
|
169
|
+
# CreateInstanceMetadata.
|
170
|
+
# The response field type is
|
171
|
+
# Instance, if successful.
|
172
|
+
# @param [String] parent
|
173
|
+
# Required. The name of the project in which to create the instance. Values
|
174
|
+
# are of the form `projects/<project>`.
|
175
|
+
# @param [Google::Apis::SpannerV1::CreateInstanceRequest] create_instance_request_object
|
176
|
+
# @param [String] fields
|
177
|
+
# Selector specifying which fields to include in a partial response.
|
178
|
+
# @param [String] quota_user
|
179
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
180
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
181
|
+
# @param [Google::Apis::RequestOptions] options
|
182
|
+
# Request-specific options
|
183
|
+
#
|
184
|
+
# @yield [result, err] Result & error if block supplied
|
185
|
+
# @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
|
186
|
+
# @yieldparam err [StandardError] error object if request failed
|
187
|
+
#
|
188
|
+
# @return [Google::Apis::SpannerV1::Operation]
|
189
|
+
#
|
190
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
191
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
192
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
193
|
+
def create_instance(parent, create_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
194
|
+
command = make_simple_command(:post, 'v1/{+parent}/instances', options)
|
195
|
+
command.request_representation = Google::Apis::SpannerV1::CreateInstanceRequest::Representation
|
196
|
+
command.request_object = create_instance_request_object
|
197
|
+
command.response_representation = Google::Apis::SpannerV1::Operation::Representation
|
198
|
+
command.response_class = Google::Apis::SpannerV1::Operation
|
199
|
+
command.params['parent'] = parent unless parent.nil?
|
200
|
+
command.query['fields'] = fields unless fields.nil?
|
201
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
202
|
+
execute_or_queue_command(command, &block)
|
203
|
+
end
|
204
|
+
|
205
|
+
# Sets the access control policy on an instance resource. Replaces any
|
206
|
+
# existing policy.
|
207
|
+
# Authorization requires `spanner.instances.setIamPolicy` on
|
208
|
+
# resource.
|
209
|
+
# @param [String] resource
|
210
|
+
# REQUIRED: The Cloud Spanner resource for which the policy is being set. The
|
211
|
+
# format is `projects/<project ID>/instances/<instance ID>` for instance
|
212
|
+
# resources and `projects/<project ID>/instances/<instance ID>/databases/<
|
213
|
+
# database ID>` for databases resources.
|
214
|
+
# @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
|
215
|
+
# @param [String] fields
|
216
|
+
# Selector specifying which fields to include in a partial response.
|
217
|
+
# @param [String] quota_user
|
218
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
219
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
220
|
+
# @param [Google::Apis::RequestOptions] options
|
221
|
+
# Request-specific options
|
222
|
+
#
|
223
|
+
# @yield [result, err] Result & error if block supplied
|
224
|
+
# @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
|
225
|
+
# @yieldparam err [StandardError] error object if request failed
|
226
|
+
#
|
227
|
+
# @return [Google::Apis::SpannerV1::Policy]
|
228
|
+
#
|
229
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
230
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
231
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
232
|
+
def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
233
|
+
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
234
|
+
command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
|
235
|
+
command.request_object = set_iam_policy_request_object
|
236
|
+
command.response_representation = Google::Apis::SpannerV1::Policy::Representation
|
237
|
+
command.response_class = Google::Apis::SpannerV1::Policy
|
238
|
+
command.params['resource'] = resource unless resource.nil?
|
239
|
+
command.query['fields'] = fields unless fields.nil?
|
240
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
241
|
+
execute_or_queue_command(command, &block)
|
242
|
+
end
|
243
|
+
|
244
|
+
# Gets the access control policy for an instance resource. Returns an empty
|
245
|
+
# policy if an instance exists but does not have a policy set.
|
246
|
+
# Authorization requires `spanner.instances.getIamPolicy` on
|
247
|
+
# resource.
|
248
|
+
# @param [String] resource
|
249
|
+
# REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
|
250
|
+
# The format is `projects/<project ID>/instances/<instance ID>` for instance
|
251
|
+
# resources and `projects/<project ID>/instances/<instance ID>/databases/<
|
252
|
+
# database ID>` for database resources.
|
253
|
+
# @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object
|
254
|
+
# @param [String] fields
|
255
|
+
# Selector specifying which fields to include in a partial response.
|
256
|
+
# @param [String] quota_user
|
257
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
258
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
259
|
+
# @param [Google::Apis::RequestOptions] options
|
260
|
+
# Request-specific options
|
261
|
+
#
|
262
|
+
# @yield [result, err] Result & error if block supplied
|
263
|
+
# @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
|
264
|
+
# @yieldparam err [StandardError] error object if request failed
|
265
|
+
#
|
266
|
+
# @return [Google::Apis::SpannerV1::Policy]
|
267
|
+
#
|
268
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
269
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
270
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
271
|
+
def get_instance_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
272
|
+
command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
|
273
|
+
command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation
|
274
|
+
command.request_object = get_iam_policy_request_object
|
275
|
+
command.response_representation = Google::Apis::SpannerV1::Policy::Representation
|
276
|
+
command.response_class = Google::Apis::SpannerV1::Policy
|
277
|
+
command.params['resource'] = resource unless resource.nil?
|
278
|
+
command.query['fields'] = fields unless fields.nil?
|
279
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
280
|
+
execute_or_queue_command(command, &block)
|
281
|
+
end
|
282
|
+
|
283
|
+
# Gets information about a particular instance.
|
284
|
+
# @param [String] name
|
285
|
+
# Required. The name of the requested instance. Values are of the form
|
286
|
+
# `projects/<project>/instances/<instance>`.
|
287
|
+
# @param [String] fields
|
288
|
+
# Selector specifying which fields to include in a partial response.
|
289
|
+
# @param [String] quota_user
|
290
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
291
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
292
|
+
# @param [Google::Apis::RequestOptions] options
|
293
|
+
# Request-specific options
|
294
|
+
#
|
295
|
+
# @yield [result, err] Result & error if block supplied
|
296
|
+
# @yieldparam result [Google::Apis::SpannerV1::Instance] parsed result object
|
297
|
+
# @yieldparam err [StandardError] error object if request failed
|
298
|
+
#
|
299
|
+
# @return [Google::Apis::SpannerV1::Instance]
|
300
|
+
#
|
301
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
302
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
303
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
304
|
+
def get_project_instance(name, fields: nil, quota_user: nil, options: nil, &block)
|
305
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
306
|
+
command.response_representation = Google::Apis::SpannerV1::Instance::Representation
|
307
|
+
command.response_class = Google::Apis::SpannerV1::Instance
|
308
|
+
command.params['name'] = name unless name.nil?
|
309
|
+
command.query['fields'] = fields unless fields.nil?
|
310
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
311
|
+
execute_or_queue_command(command, &block)
|
312
|
+
end
|
313
|
+
|
314
|
+
# Updates an instance, and begins allocating or releasing resources
|
315
|
+
# as requested. The returned long-running
|
316
|
+
# operation can be used to track the
|
317
|
+
# progress of updating the instance. If the named instance does not
|
318
|
+
# exist, returns `NOT_FOUND`.
|
319
|
+
# Immediately upon completion of this request:
|
320
|
+
# * For resource types for which a decrease in the instance's allocation
|
321
|
+
# has been requested, billing is based on the newly-requested level.
|
322
|
+
# Until completion of the returned operation:
|
323
|
+
# * Cancelling the operation sets its metadata's
|
324
|
+
# cancel_time, and begins
|
325
|
+
# restoring resources to their pre-request values. The operation
|
326
|
+
# is guaranteed to succeed at undoing all resource changes,
|
327
|
+
# after which point it terminates with a `CANCELLED` status.
|
328
|
+
# * All other attempts to modify the instance are rejected.
|
329
|
+
# * Reading the instance via the API continues to give the pre-request
|
330
|
+
# resource levels.
|
331
|
+
# Upon completion of the returned operation:
|
332
|
+
# * Billing begins for all successfully-allocated resources (some types
|
333
|
+
# may have lower than the requested levels).
|
334
|
+
# * All newly-reserved resources are available for serving the instance's
|
335
|
+
# tables.
|
336
|
+
# * The instance's new resource levels are readable via the API.
|
337
|
+
# The returned long-running operation will
|
338
|
+
# have a name of the format `<instance_name>/operations/<operation_id>` and
|
339
|
+
# can be used to track the instance modification. The
|
340
|
+
# metadata field type is
|
341
|
+
# UpdateInstanceMetadata.
|
342
|
+
# The response field type is
|
343
|
+
# Instance, if successful.
|
344
|
+
# Authorization requires `spanner.instances.update` permission on
|
345
|
+
# resource name.
|
346
|
+
# @param [String] name
|
347
|
+
# Required. A unique identifier for the instance, which cannot be changed
|
348
|
+
# after the instance is created. Values are of the form
|
349
|
+
# `projects/<project>/instances/a-z*[a-z0-9]`. The final
|
350
|
+
# segment of the name must be between 6 and 30 characters in length.
|
351
|
+
# @param [Google::Apis::SpannerV1::UpdateInstanceRequest] update_instance_request_object
|
352
|
+
# @param [String] fields
|
353
|
+
# Selector specifying which fields to include in a partial response.
|
354
|
+
# @param [String] quota_user
|
355
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
356
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
357
|
+
# @param [Google::Apis::RequestOptions] options
|
358
|
+
# Request-specific options
|
359
|
+
#
|
360
|
+
# @yield [result, err] Result & error if block supplied
|
361
|
+
# @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
|
362
|
+
# @yieldparam err [StandardError] error object if request failed
|
363
|
+
#
|
364
|
+
# @return [Google::Apis::SpannerV1::Operation]
|
365
|
+
#
|
366
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
367
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
368
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
369
|
+
def patch_project_instance(name, update_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
370
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
371
|
+
command.request_representation = Google::Apis::SpannerV1::UpdateInstanceRequest::Representation
|
372
|
+
command.request_object = update_instance_request_object
|
373
|
+
command.response_representation = Google::Apis::SpannerV1::Operation::Representation
|
374
|
+
command.response_class = Google::Apis::SpannerV1::Operation
|
375
|
+
command.params['name'] = name unless name.nil?
|
376
|
+
command.query['fields'] = fields unless fields.nil?
|
377
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
378
|
+
execute_or_queue_command(command, &block)
|
379
|
+
end
|
380
|
+
|
381
|
+
# Returns permissions that the caller has on the specified instance resource.
|
382
|
+
# Attempting this RPC on a non-existent Cloud Spanner instance resource will
|
383
|
+
# result in a NOT_FOUND error if the user has `spanner.instances.list`
|
384
|
+
# permission on the containing Google Cloud Project. Otherwise returns an
|
385
|
+
# empty set of permissions.
|
386
|
+
# @param [String] resource
|
387
|
+
# REQUIRED: The Cloud Spanner resource for which permissions are being tested.
|
388
|
+
# The format is `projects/<project ID>/instances/<instance ID>` for instance
|
389
|
+
# resources and `projects/<project ID>/instances/<instance ID>/databases/<
|
390
|
+
# database ID>` for database resources.
|
391
|
+
# @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
392
|
+
# @param [String] fields
|
393
|
+
# Selector specifying which fields to include in a partial response.
|
394
|
+
# @param [String] quota_user
|
395
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
396
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
397
|
+
# @param [Google::Apis::RequestOptions] options
|
398
|
+
# Request-specific options
|
399
|
+
#
|
400
|
+
# @yield [result, err] Result & error if block supplied
|
401
|
+
# @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object
|
402
|
+
# @yieldparam err [StandardError] error object if request failed
|
403
|
+
#
|
404
|
+
# @return [Google::Apis::SpannerV1::TestIamPermissionsResponse]
|
405
|
+
#
|
406
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
407
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
408
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
409
|
+
def test_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
410
|
+
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
411
|
+
command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
|
412
|
+
command.request_object = test_iam_permissions_request_object
|
413
|
+
command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
|
414
|
+
command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
|
415
|
+
command.params['resource'] = resource unless resource.nil?
|
416
|
+
command.query['fields'] = fields unless fields.nil?
|
417
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
418
|
+
execute_or_queue_command(command, &block)
|
419
|
+
end
|
420
|
+
|
421
|
+
# Returns the schema of a Cloud Spanner database as a list of formatted
|
422
|
+
# DDL statements. This method does not show pending schema updates, those may
|
423
|
+
# be queried using the Operations API.
|
424
|
+
# @param [String] database
|
425
|
+
# Required. The database whose schema we wish to get.
|
426
|
+
# @param [String] fields
|
427
|
+
# Selector specifying which fields to include in a partial response.
|
428
|
+
# @param [String] quota_user
|
429
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
430
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
431
|
+
# @param [Google::Apis::RequestOptions] options
|
432
|
+
# Request-specific options
|
433
|
+
#
|
434
|
+
# @yield [result, err] Result & error if block supplied
|
435
|
+
# @yieldparam result [Google::Apis::SpannerV1::GetDatabaseDdlResponse] parsed result object
|
436
|
+
# @yieldparam err [StandardError] error object if request failed
|
437
|
+
#
|
438
|
+
# @return [Google::Apis::SpannerV1::GetDatabaseDdlResponse]
|
439
|
+
#
|
440
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
441
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
442
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
443
|
+
def get_project_instance_database_ddl(database, fields: nil, quota_user: nil, options: nil, &block)
|
444
|
+
command = make_simple_command(:get, 'v1/{+database}/ddl', options)
|
445
|
+
command.response_representation = Google::Apis::SpannerV1::GetDatabaseDdlResponse::Representation
|
446
|
+
command.response_class = Google::Apis::SpannerV1::GetDatabaseDdlResponse
|
447
|
+
command.params['database'] = database unless database.nil?
|
448
|
+
command.query['fields'] = fields unless fields.nil?
|
449
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
450
|
+
execute_or_queue_command(command, &block)
|
451
|
+
end
|
452
|
+
|
453
|
+
# Lists Cloud Spanner databases.
|
454
|
+
# @param [String] parent
|
455
|
+
# Required. The instance whose databases should be listed.
|
456
|
+
# Values are of the form `projects/<project>/instances/<instance>`.
|
457
|
+
# @param [String] page_token
|
458
|
+
# If non-empty, `page_token` should contain a
|
459
|
+
# next_page_token from a
|
460
|
+
# previous ListDatabasesResponse.
|
461
|
+
# @param [Fixnum] page_size
|
462
|
+
# Number of databases to be returned in the response. If 0 or less,
|
463
|
+
# defaults to the server's maximum allowed page size.
|
464
|
+
# @param [String] fields
|
465
|
+
# Selector specifying which fields to include in a partial response.
|
466
|
+
# @param [String] quota_user
|
467
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
468
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
469
|
+
# @param [Google::Apis::RequestOptions] options
|
470
|
+
# Request-specific options
|
471
|
+
#
|
472
|
+
# @yield [result, err] Result & error if block supplied
|
473
|
+
# @yieldparam result [Google::Apis::SpannerV1::ListDatabasesResponse] parsed result object
|
474
|
+
# @yieldparam err [StandardError] error object if request failed
|
475
|
+
#
|
476
|
+
# @return [Google::Apis::SpannerV1::ListDatabasesResponse]
|
477
|
+
#
|
478
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
479
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
480
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
481
|
+
def list_project_instance_databases(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
482
|
+
command = make_simple_command(:get, 'v1/{+parent}/databases', options)
|
483
|
+
command.response_representation = Google::Apis::SpannerV1::ListDatabasesResponse::Representation
|
484
|
+
command.response_class = Google::Apis::SpannerV1::ListDatabasesResponse
|
485
|
+
command.params['parent'] = parent unless parent.nil?
|
486
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
487
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
488
|
+
command.query['fields'] = fields unless fields.nil?
|
489
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
490
|
+
execute_or_queue_command(command, &block)
|
491
|
+
end
|
492
|
+
|
493
|
+
# Sets the access control policy on a database resource. Replaces any
|
494
|
+
# existing policy.
|
495
|
+
# Authorization requires `spanner.databases.setIamPolicy` permission on
|
496
|
+
# resource.
|
497
|
+
# @param [String] resource
|
498
|
+
# REQUIRED: The Cloud Spanner resource for which the policy is being set. The
|
499
|
+
# format is `projects/<project ID>/instances/<instance ID>` for instance
|
500
|
+
# resources and `projects/<project ID>/instances/<instance ID>/databases/<
|
501
|
+
# database ID>` for databases resources.
|
502
|
+
# @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
|
503
|
+
# @param [String] fields
|
504
|
+
# Selector specifying which fields to include in a partial response.
|
505
|
+
# @param [String] quota_user
|
506
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
507
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
508
|
+
# @param [Google::Apis::RequestOptions] options
|
509
|
+
# Request-specific options
|
510
|
+
#
|
511
|
+
# @yield [result, err] Result & error if block supplied
|
512
|
+
# @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
|
513
|
+
# @yieldparam err [StandardError] error object if request failed
|
514
|
+
#
|
515
|
+
# @return [Google::Apis::SpannerV1::Policy]
|
516
|
+
#
|
517
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
518
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
519
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
520
|
+
def set_database_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
521
|
+
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
522
|
+
command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
|
523
|
+
command.request_object = set_iam_policy_request_object
|
524
|
+
command.response_representation = Google::Apis::SpannerV1::Policy::Representation
|
525
|
+
command.response_class = Google::Apis::SpannerV1::Policy
|
526
|
+
command.params['resource'] = resource unless resource.nil?
|
527
|
+
command.query['fields'] = fields unless fields.nil?
|
528
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
529
|
+
execute_or_queue_command(command, &block)
|
530
|
+
end
|
531
|
+
|
532
|
+
# Creates a new Cloud Spanner database and starts to prepare it for serving.
|
533
|
+
# The returned long-running operation will
|
534
|
+
# have a name of the format `<database_name>/operations/<operation_id>` and
|
535
|
+
# can be used to track preparation of the database. The
|
536
|
+
# metadata field type is
|
537
|
+
# CreateDatabaseMetadata. The
|
538
|
+
# response field type is
|
539
|
+
# Database, if successful.
|
540
|
+
# @param [String] parent
|
541
|
+
# Required. The name of the instance that will serve the new database.
|
542
|
+
# Values are of the form `projects/<project>/instances/<instance>`.
|
543
|
+
# @param [Google::Apis::SpannerV1::CreateDatabaseRequest] create_database_request_object
|
544
|
+
# @param [String] fields
|
545
|
+
# Selector specifying which fields to include in a partial response.
|
546
|
+
# @param [String] quota_user
|
547
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
548
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
549
|
+
# @param [Google::Apis::RequestOptions] options
|
550
|
+
# Request-specific options
|
551
|
+
#
|
552
|
+
# @yield [result, err] Result & error if block supplied
|
553
|
+
# @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
|
554
|
+
# @yieldparam err [StandardError] error object if request failed
|
555
|
+
#
|
556
|
+
# @return [Google::Apis::SpannerV1::Operation]
|
557
|
+
#
|
558
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
559
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
560
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
561
|
+
def create_database(parent, create_database_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
562
|
+
command = make_simple_command(:post, 'v1/{+parent}/databases', options)
|
563
|
+
command.request_representation = Google::Apis::SpannerV1::CreateDatabaseRequest::Representation
|
564
|
+
command.request_object = create_database_request_object
|
565
|
+
command.response_representation = Google::Apis::SpannerV1::Operation::Representation
|
566
|
+
command.response_class = Google::Apis::SpannerV1::Operation
|
567
|
+
command.params['parent'] = parent unless parent.nil?
|
568
|
+
command.query['fields'] = fields unless fields.nil?
|
569
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
570
|
+
execute_or_queue_command(command, &block)
|
571
|
+
end
|
572
|
+
|
573
|
+
# Gets the access control policy for a database resource. Returns an empty
|
574
|
+
# policy if a database exists but does not have a policy set.
|
575
|
+
# Authorization requires `spanner.databases.getIamPolicy` permission on
|
576
|
+
# resource.
|
577
|
+
# @param [String] resource
|
578
|
+
# REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
|
579
|
+
# The format is `projects/<project ID>/instances/<instance ID>` for instance
|
580
|
+
# resources and `projects/<project ID>/instances/<instance ID>/databases/<
|
581
|
+
# database ID>` for database resources.
|
582
|
+
# @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object
|
583
|
+
# @param [String] fields
|
584
|
+
# Selector specifying which fields to include in a partial response.
|
585
|
+
# @param [String] quota_user
|
586
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
587
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
588
|
+
# @param [Google::Apis::RequestOptions] options
|
589
|
+
# Request-specific options
|
590
|
+
#
|
591
|
+
# @yield [result, err] Result & error if block supplied
|
592
|
+
# @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
|
593
|
+
# @yieldparam err [StandardError] error object if request failed
|
594
|
+
#
|
595
|
+
# @return [Google::Apis::SpannerV1::Policy]
|
596
|
+
#
|
597
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
598
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
599
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
600
|
+
def get_database_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
601
|
+
command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
|
602
|
+
command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation
|
603
|
+
command.request_object = get_iam_policy_request_object
|
604
|
+
command.response_representation = Google::Apis::SpannerV1::Policy::Representation
|
605
|
+
command.response_class = Google::Apis::SpannerV1::Policy
|
606
|
+
command.params['resource'] = resource unless resource.nil?
|
607
|
+
command.query['fields'] = fields unless fields.nil?
|
608
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
609
|
+
execute_or_queue_command(command, &block)
|
610
|
+
end
|
611
|
+
|
612
|
+
# Gets the state of a Cloud Spanner database.
|
613
|
+
# @param [String] name
|
614
|
+
# Required. The name of the requested database. Values are of the form
|
615
|
+
# `projects/<project>/instances/<instance>/databases/<database>`.
|
616
|
+
# @param [String] fields
|
617
|
+
# Selector specifying which fields to include in a partial response.
|
618
|
+
# @param [String] quota_user
|
619
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
620
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
621
|
+
# @param [Google::Apis::RequestOptions] options
|
622
|
+
# Request-specific options
|
623
|
+
#
|
624
|
+
# @yield [result, err] Result & error if block supplied
|
625
|
+
# @yieldparam result [Google::Apis::SpannerV1::Database] parsed result object
|
626
|
+
# @yieldparam err [StandardError] error object if request failed
|
627
|
+
#
|
628
|
+
# @return [Google::Apis::SpannerV1::Database]
|
629
|
+
#
|
630
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
631
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
632
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
633
|
+
def get_project_instance_database(name, fields: nil, quota_user: nil, options: nil, &block)
|
634
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
635
|
+
command.response_representation = Google::Apis::SpannerV1::Database::Representation
|
636
|
+
command.response_class = Google::Apis::SpannerV1::Database
|
637
|
+
command.params['name'] = name unless name.nil?
|
638
|
+
command.query['fields'] = fields unless fields.nil?
|
639
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
640
|
+
execute_or_queue_command(command, &block)
|
641
|
+
end
|
642
|
+
|
643
|
+
# Drops (aka deletes) a Cloud Spanner database.
|
644
|
+
# @param [String] database
|
645
|
+
# Required. The database to be dropped.
|
646
|
+
# @param [String] fields
|
647
|
+
# Selector specifying which fields to include in a partial response.
|
648
|
+
# @param [String] quota_user
|
649
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
650
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
651
|
+
# @param [Google::Apis::RequestOptions] options
|
652
|
+
# Request-specific options
|
653
|
+
#
|
654
|
+
# @yield [result, err] Result & error if block supplied
|
655
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
656
|
+
# @yieldparam err [StandardError] error object if request failed
|
657
|
+
#
|
658
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
659
|
+
#
|
660
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
661
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
662
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
663
|
+
def drop_project_instance_database_database(database, fields: nil, quota_user: nil, options: nil, &block)
|
664
|
+
command = make_simple_command(:delete, 'v1/{+database}', options)
|
665
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
666
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
667
|
+
command.params['database'] = database unless database.nil?
|
668
|
+
command.query['fields'] = fields unless fields.nil?
|
669
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
670
|
+
execute_or_queue_command(command, &block)
|
671
|
+
end
|
672
|
+
|
673
|
+
# Updates the schema of a Cloud Spanner database by
|
674
|
+
# creating/altering/dropping tables, columns, indexes, etc. The returned
|
675
|
+
# long-running operation will have a name of
|
676
|
+
# the format `<database_name>/operations/<operation_id>` and can be used to
|
677
|
+
# track execution of the schema change(s). The
|
678
|
+
# metadata field type is
|
679
|
+
# UpdateDatabaseDdlMetadata. The operation has no response.
|
680
|
+
# @param [String] database
|
681
|
+
# Required. The database to update.
|
682
|
+
# @param [Google::Apis::SpannerV1::UpdateDatabaseDdlRequest] update_database_ddl_request_object
|
683
|
+
# @param [String] fields
|
684
|
+
# Selector specifying which fields to include in a partial response.
|
685
|
+
# @param [String] quota_user
|
686
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
687
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
688
|
+
# @param [Google::Apis::RequestOptions] options
|
689
|
+
# Request-specific options
|
690
|
+
#
|
691
|
+
# @yield [result, err] Result & error if block supplied
|
692
|
+
# @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
|
693
|
+
# @yieldparam err [StandardError] error object if request failed
|
694
|
+
#
|
695
|
+
# @return [Google::Apis::SpannerV1::Operation]
|
696
|
+
#
|
697
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
698
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
699
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
700
|
+
def update_project_instance_database_ddl(database, update_database_ddl_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
701
|
+
command = make_simple_command(:patch, 'v1/{+database}/ddl', options)
|
702
|
+
command.request_representation = Google::Apis::SpannerV1::UpdateDatabaseDdlRequest::Representation
|
703
|
+
command.request_object = update_database_ddl_request_object
|
704
|
+
command.response_representation = Google::Apis::SpannerV1::Operation::Representation
|
705
|
+
command.response_class = Google::Apis::SpannerV1::Operation
|
706
|
+
command.params['database'] = database unless database.nil?
|
707
|
+
command.query['fields'] = fields unless fields.nil?
|
708
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
709
|
+
execute_or_queue_command(command, &block)
|
710
|
+
end
|
711
|
+
|
712
|
+
# Returns permissions that the caller has on the specified database resource.
|
713
|
+
# Attempting this RPC on a non-existent Cloud Spanner database will result in
|
714
|
+
# a NOT_FOUND error if the user has `spanner.databases.list` permission on
|
715
|
+
# the containing Cloud Spanner instance. Otherwise returns an empty set of
|
716
|
+
# permissions.
|
717
|
+
# @param [String] resource
|
718
|
+
# REQUIRED: The Cloud Spanner resource for which permissions are being tested.
|
719
|
+
# The format is `projects/<project ID>/instances/<instance ID>` for instance
|
720
|
+
# resources and `projects/<project ID>/instances/<instance ID>/databases/<
|
721
|
+
# database ID>` for database resources.
|
722
|
+
# @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
723
|
+
# @param [String] fields
|
724
|
+
# Selector specifying which fields to include in a partial response.
|
725
|
+
# @param [String] quota_user
|
726
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
727
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
728
|
+
# @param [Google::Apis::RequestOptions] options
|
729
|
+
# Request-specific options
|
730
|
+
#
|
731
|
+
# @yield [result, err] Result & error if block supplied
|
732
|
+
# @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object
|
733
|
+
# @yieldparam err [StandardError] error object if request failed
|
734
|
+
#
|
735
|
+
# @return [Google::Apis::SpannerV1::TestIamPermissionsResponse]
|
736
|
+
#
|
737
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
738
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
739
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
740
|
+
def test_database_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
741
|
+
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
742
|
+
command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
|
743
|
+
command.request_object = test_iam_permissions_request_object
|
744
|
+
command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
|
745
|
+
command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
|
746
|
+
command.params['resource'] = resource unless resource.nil?
|
747
|
+
command.query['fields'] = fields unless fields.nil?
|
748
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
749
|
+
execute_or_queue_command(command, &block)
|
750
|
+
end
|
751
|
+
|
752
|
+
# Starts asynchronous cancellation on a long-running operation. The server
|
753
|
+
# makes a best effort to cancel the operation, but success is not
|
754
|
+
# guaranteed. If the server doesn't support this method, it returns
|
755
|
+
# `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
756
|
+
# Operations.GetOperation or
|
757
|
+
# other methods to check whether the cancellation succeeded or whether the
|
758
|
+
# operation completed despite cancellation. On successful cancellation,
|
759
|
+
# the operation is not deleted; instead, it becomes an operation with
|
760
|
+
# an Operation.error value with a google.rpc.Status.code of 1,
|
761
|
+
# corresponding to `Code.CANCELLED`.
|
762
|
+
# @param [String] name
|
763
|
+
# The name of the operation resource to be cancelled.
|
764
|
+
# @param [String] fields
|
765
|
+
# Selector specifying which fields to include in a partial response.
|
766
|
+
# @param [String] quota_user
|
767
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
768
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
769
|
+
# @param [Google::Apis::RequestOptions] options
|
770
|
+
# Request-specific options
|
771
|
+
#
|
772
|
+
# @yield [result, err] Result & error if block supplied
|
773
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
774
|
+
# @yieldparam err [StandardError] error object if request failed
|
775
|
+
#
|
776
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
777
|
+
#
|
778
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
779
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
780
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
781
|
+
def cancel_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
782
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
783
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
784
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
785
|
+
command.params['name'] = name unless name.nil?
|
786
|
+
command.query['fields'] = fields unless fields.nil?
|
787
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
788
|
+
execute_or_queue_command(command, &block)
|
789
|
+
end
|
790
|
+
|
791
|
+
# Deletes a long-running operation. This method indicates that the client is
|
792
|
+
# no longer interested in the operation result. It does not cancel the
|
793
|
+
# operation. If the server doesn't support this method, it returns
|
794
|
+
# `google.rpc.Code.UNIMPLEMENTED`.
|
795
|
+
# @param [String] name
|
796
|
+
# The name of the operation resource to be deleted.
|
797
|
+
# @param [String] fields
|
798
|
+
# Selector specifying which fields to include in a partial response.
|
799
|
+
# @param [String] quota_user
|
800
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
801
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
802
|
+
# @param [Google::Apis::RequestOptions] options
|
803
|
+
# Request-specific options
|
804
|
+
#
|
805
|
+
# @yield [result, err] Result & error if block supplied
|
806
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
807
|
+
# @yieldparam err [StandardError] error object if request failed
|
808
|
+
#
|
809
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
810
|
+
#
|
811
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
812
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
813
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
814
|
+
def delete_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
815
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
816
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
817
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
818
|
+
command.params['name'] = name unless name.nil?
|
819
|
+
command.query['fields'] = fields unless fields.nil?
|
820
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
821
|
+
execute_or_queue_command(command, &block)
|
822
|
+
end
|
823
|
+
|
824
|
+
# Lists operations that match the specified filter in the request. If the
|
825
|
+
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
826
|
+
# NOTE: the `name` binding below allows API services to override the binding
|
827
|
+
# to use different resource name schemes, such as `users/*/operations`.
|
828
|
+
# @param [String] name
|
829
|
+
# The name of the operation collection.
|
830
|
+
# @param [String] filter
|
831
|
+
# The standard list filter.
|
832
|
+
# @param [String] page_token
|
833
|
+
# The standard list page token.
|
834
|
+
# @param [Fixnum] page_size
|
835
|
+
# The standard list page size.
|
836
|
+
# @param [String] fields
|
837
|
+
# Selector specifying which fields to include in a partial response.
|
838
|
+
# @param [String] quota_user
|
839
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
840
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
841
|
+
# @param [Google::Apis::RequestOptions] options
|
842
|
+
# Request-specific options
|
843
|
+
#
|
844
|
+
# @yield [result, err] Result & error if block supplied
|
845
|
+
# @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object
|
846
|
+
# @yieldparam err [StandardError] error object if request failed
|
847
|
+
#
|
848
|
+
# @return [Google::Apis::SpannerV1::ListOperationsResponse]
|
849
|
+
#
|
850
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
851
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
852
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
853
|
+
def list_project_instance_database_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
854
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
855
|
+
command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
|
856
|
+
command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
|
857
|
+
command.params['name'] = name unless name.nil?
|
858
|
+
command.query['filter'] = filter unless filter.nil?
|
859
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
860
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
861
|
+
command.query['fields'] = fields unless fields.nil?
|
862
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
863
|
+
execute_or_queue_command(command, &block)
|
864
|
+
end
|
865
|
+
|
866
|
+
# Gets the latest state of a long-running operation. Clients can use this
|
867
|
+
# method to poll the operation result at intervals as recommended by the API
|
868
|
+
# service.
|
869
|
+
# @param [String] name
|
870
|
+
# The name of the operation resource.
|
871
|
+
# @param [String] fields
|
872
|
+
# Selector specifying which fields to include in a partial response.
|
873
|
+
# @param [String] quota_user
|
874
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
875
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
876
|
+
# @param [Google::Apis::RequestOptions] options
|
877
|
+
# Request-specific options
|
878
|
+
#
|
879
|
+
# @yield [result, err] Result & error if block supplied
|
880
|
+
# @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
|
881
|
+
# @yieldparam err [StandardError] error object if request failed
|
882
|
+
#
|
883
|
+
# @return [Google::Apis::SpannerV1::Operation]
|
884
|
+
#
|
885
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
886
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
887
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
888
|
+
def get_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
889
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
890
|
+
command.response_representation = Google::Apis::SpannerV1::Operation::Representation
|
891
|
+
command.response_class = Google::Apis::SpannerV1::Operation
|
892
|
+
command.params['name'] = name unless name.nil?
|
893
|
+
command.query['fields'] = fields unless fields.nil?
|
894
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
895
|
+
execute_or_queue_command(command, &block)
|
896
|
+
end
|
897
|
+
|
898
|
+
# Like Read, except returns the result set as a
|
899
|
+
# stream. Unlike Read, there is no limit on the
|
900
|
+
# size of the returned result set. However, no individual row in
|
901
|
+
# the result set can exceed 100 MiB, and no column value can exceed
|
902
|
+
# 10 MiB.
|
903
|
+
# @param [String] session
|
904
|
+
# Required. The session in which the read should be performed.
|
905
|
+
# @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
|
906
|
+
# @param [String] fields
|
907
|
+
# Selector specifying which fields to include in a partial response.
|
908
|
+
# @param [String] quota_user
|
909
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
910
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
911
|
+
# @param [Google::Apis::RequestOptions] options
|
912
|
+
# Request-specific options
|
913
|
+
#
|
914
|
+
# @yield [result, err] Result & error if block supplied
|
915
|
+
# @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
|
916
|
+
# @yieldparam err [StandardError] error object if request failed
|
917
|
+
#
|
918
|
+
# @return [Google::Apis::SpannerV1::PartialResultSet]
|
919
|
+
#
|
920
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
921
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
922
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
923
|
+
def streaming_project_instance_database_session_read(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
924
|
+
command = make_simple_command(:post, 'v1/{+session}:streamingRead', options)
|
925
|
+
command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
|
926
|
+
command.request_object = read_request_object
|
927
|
+
command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
|
928
|
+
command.response_class = Google::Apis::SpannerV1::PartialResultSet
|
929
|
+
command.params['session'] = session unless session.nil?
|
930
|
+
command.query['fields'] = fields unless fields.nil?
|
931
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
932
|
+
execute_or_queue_command(command, &block)
|
933
|
+
end
|
934
|
+
|
935
|
+
# Rolls back a transaction, releasing any locks it holds. It is a good
|
936
|
+
# idea to call this for any transaction that includes one or more
|
937
|
+
# Read or ExecuteSql requests and
|
938
|
+
# ultimately decides not to commit.
|
939
|
+
# `Rollback` returns `OK` if it successfully aborts the transaction, the
|
940
|
+
# transaction was already aborted, or the transaction is not
|
941
|
+
# found. `Rollback` never returns `ABORTED`.
|
942
|
+
# @param [String] session
|
943
|
+
# Required. The session in which the transaction to roll back is running.
|
944
|
+
# @param [Google::Apis::SpannerV1::RollbackRequest] rollback_request_object
|
945
|
+
# @param [String] fields
|
946
|
+
# Selector specifying which fields to include in a partial response.
|
947
|
+
# @param [String] quota_user
|
948
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
949
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
950
|
+
# @param [Google::Apis::RequestOptions] options
|
951
|
+
# Request-specific options
|
952
|
+
#
|
953
|
+
# @yield [result, err] Result & error if block supplied
|
954
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
955
|
+
# @yieldparam err [StandardError] error object if request failed
|
956
|
+
#
|
957
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
958
|
+
#
|
959
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
960
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
961
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
962
|
+
def rollback_session(session, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
963
|
+
command = make_simple_command(:post, 'v1/{+session}:rollback', options)
|
964
|
+
command.request_representation = Google::Apis::SpannerV1::RollbackRequest::Representation
|
965
|
+
command.request_object = rollback_request_object
|
966
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
967
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
968
|
+
command.params['session'] = session unless session.nil?
|
969
|
+
command.query['fields'] = fields unless fields.nil?
|
970
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
971
|
+
execute_or_queue_command(command, &block)
|
972
|
+
end
|
973
|
+
|
974
|
+
# Creates a new session. A session can be used to perform
|
975
|
+
# transactions that read and/or modify data in a Cloud Spanner database.
|
976
|
+
# Sessions are meant to be reused for many consecutive
|
977
|
+
# transactions.
|
978
|
+
# Sessions can only execute one transaction at a time. To execute
|
979
|
+
# multiple concurrent read-write/write-only transactions, create
|
980
|
+
# multiple sessions. Note that standalone reads and queries use a
|
981
|
+
# transaction internally, and count toward the one transaction
|
982
|
+
# limit.
|
983
|
+
# Cloud Spanner limits the number of sessions that can exist at any given
|
984
|
+
# time; thus, it is a good idea to delete idle and/or unneeded sessions.
|
985
|
+
# Aside from explicit deletes, Cloud Spanner can delete sessions for which no
|
986
|
+
# operations are sent for more than an hour. If a session is deleted,
|
987
|
+
# requests to it return `NOT_FOUND`.
|
988
|
+
# Idle sessions can be kept alive by sending a trivial SQL query
|
989
|
+
# periodically, e.g., `"SELECT 1"`.
|
990
|
+
# @param [String] database
|
991
|
+
# Required. The database in which the new session is created.
|
992
|
+
# @param [String] fields
|
993
|
+
# Selector specifying which fields to include in a partial response.
|
994
|
+
# @param [String] quota_user
|
995
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
996
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
997
|
+
# @param [Google::Apis::RequestOptions] options
|
998
|
+
# Request-specific options
|
999
|
+
#
|
1000
|
+
# @yield [result, err] Result & error if block supplied
|
1001
|
+
# @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object
|
1002
|
+
# @yieldparam err [StandardError] error object if request failed
|
1003
|
+
#
|
1004
|
+
# @return [Google::Apis::SpannerV1::Session]
|
1005
|
+
#
|
1006
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1007
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1008
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1009
|
+
def create_project_instance_database_session(database, fields: nil, quota_user: nil, options: nil, &block)
|
1010
|
+
command = make_simple_command(:post, 'v1/{+database}/sessions', options)
|
1011
|
+
command.response_representation = Google::Apis::SpannerV1::Session::Representation
|
1012
|
+
command.response_class = Google::Apis::SpannerV1::Session
|
1013
|
+
command.params['database'] = database unless database.nil?
|
1014
|
+
command.query['fields'] = fields unless fields.nil?
|
1015
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1016
|
+
execute_or_queue_command(command, &block)
|
1017
|
+
end
|
1018
|
+
|
1019
|
+
# Reads rows from the database using key lookups and scans, as a
|
1020
|
+
# simple key/value style alternative to
|
1021
|
+
# ExecuteSql. This method cannot be used to
|
1022
|
+
# return a result set larger than 10 MiB; if the read matches more
|
1023
|
+
# data than that, the read fails with a `FAILED_PRECONDITION`
|
1024
|
+
# error.
|
1025
|
+
# Reads inside read-write transactions might return `ABORTED`. If
|
1026
|
+
# this occurs, the application should restart the transaction from
|
1027
|
+
# the beginning. See Transaction for more details.
|
1028
|
+
# Larger result sets can be yielded in streaming fashion by calling
|
1029
|
+
# StreamingRead instead.
|
1030
|
+
# @param [String] session
|
1031
|
+
# Required. The session in which the read should be performed.
|
1032
|
+
# @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
|
1033
|
+
# @param [String] fields
|
1034
|
+
# Selector specifying which fields to include in a partial response.
|
1035
|
+
# @param [String] quota_user
|
1036
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1037
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1038
|
+
# @param [Google::Apis::RequestOptions] options
|
1039
|
+
# Request-specific options
|
1040
|
+
#
|
1041
|
+
# @yield [result, err] Result & error if block supplied
|
1042
|
+
# @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
|
1043
|
+
# @yieldparam err [StandardError] error object if request failed
|
1044
|
+
#
|
1045
|
+
# @return [Google::Apis::SpannerV1::ResultSet]
|
1046
|
+
#
|
1047
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1048
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1049
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1050
|
+
def read_session(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1051
|
+
command = make_simple_command(:post, 'v1/{+session}:read', options)
|
1052
|
+
command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
|
1053
|
+
command.request_object = read_request_object
|
1054
|
+
command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
|
1055
|
+
command.response_class = Google::Apis::SpannerV1::ResultSet
|
1056
|
+
command.params['session'] = session unless session.nil?
|
1057
|
+
command.query['fields'] = fields unless fields.nil?
|
1058
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1059
|
+
execute_or_queue_command(command, &block)
|
1060
|
+
end
|
1061
|
+
|
1062
|
+
# Gets a session. Returns `NOT_FOUND` if the session does not exist.
|
1063
|
+
# This is mainly useful for determining whether a session is still
|
1064
|
+
# alive.
|
1065
|
+
# @param [String] name
|
1066
|
+
# Required. The name of the session to retrieve.
|
1067
|
+
# @param [String] fields
|
1068
|
+
# Selector specifying which fields to include in a partial response.
|
1069
|
+
# @param [String] quota_user
|
1070
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1071
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1072
|
+
# @param [Google::Apis::RequestOptions] options
|
1073
|
+
# Request-specific options
|
1074
|
+
#
|
1075
|
+
# @yield [result, err] Result & error if block supplied
|
1076
|
+
# @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object
|
1077
|
+
# @yieldparam err [StandardError] error object if request failed
|
1078
|
+
#
|
1079
|
+
# @return [Google::Apis::SpannerV1::Session]
|
1080
|
+
#
|
1081
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1082
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1083
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1084
|
+
def get_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block)
|
1085
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
1086
|
+
command.response_representation = Google::Apis::SpannerV1::Session::Representation
|
1087
|
+
command.response_class = Google::Apis::SpannerV1::Session
|
1088
|
+
command.params['name'] = name unless name.nil?
|
1089
|
+
command.query['fields'] = fields unless fields.nil?
|
1090
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1091
|
+
execute_or_queue_command(command, &block)
|
1092
|
+
end
|
1093
|
+
|
1094
|
+
# Ends a session, releasing server resources associated with it.
|
1095
|
+
# @param [String] name
|
1096
|
+
# Required. The name of the session to delete.
|
1097
|
+
# @param [String] fields
|
1098
|
+
# Selector specifying which fields to include in a partial response.
|
1099
|
+
# @param [String] quota_user
|
1100
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1101
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1102
|
+
# @param [Google::Apis::RequestOptions] options
|
1103
|
+
# Request-specific options
|
1104
|
+
#
|
1105
|
+
# @yield [result, err] Result & error if block supplied
|
1106
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
1107
|
+
# @yieldparam err [StandardError] error object if request failed
|
1108
|
+
#
|
1109
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
1110
|
+
#
|
1111
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1112
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1113
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1114
|
+
def delete_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block)
|
1115
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
1116
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
1117
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
1118
|
+
command.params['name'] = name unless name.nil?
|
1119
|
+
command.query['fields'] = fields unless fields.nil?
|
1120
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1121
|
+
execute_or_queue_command(command, &block)
|
1122
|
+
end
|
1123
|
+
|
1124
|
+
# Like ExecuteSql, except returns the result
|
1125
|
+
# set as a stream. Unlike ExecuteSql, there
|
1126
|
+
# is no limit on the size of the returned result set. However, no
|
1127
|
+
# individual row in the result set can exceed 100 MiB, and no
|
1128
|
+
# column value can exceed 10 MiB.
|
1129
|
+
# @param [String] session
|
1130
|
+
# Required. The session in which the SQL query should be performed.
|
1131
|
+
# @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object
|
1132
|
+
# @param [String] fields
|
1133
|
+
# Selector specifying which fields to include in a partial response.
|
1134
|
+
# @param [String] quota_user
|
1135
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1136
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1137
|
+
# @param [Google::Apis::RequestOptions] options
|
1138
|
+
# Request-specific options
|
1139
|
+
#
|
1140
|
+
# @yield [result, err] Result & error if block supplied
|
1141
|
+
# @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
|
1142
|
+
# @yieldparam err [StandardError] error object if request failed
|
1143
|
+
#
|
1144
|
+
# @return [Google::Apis::SpannerV1::PartialResultSet]
|
1145
|
+
#
|
1146
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1147
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1148
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1149
|
+
def execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1150
|
+
command = make_simple_command(:post, 'v1/{+session}:executeStreamingSql', options)
|
1151
|
+
command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation
|
1152
|
+
command.request_object = execute_sql_request_object
|
1153
|
+
command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
|
1154
|
+
command.response_class = Google::Apis::SpannerV1::PartialResultSet
|
1155
|
+
command.params['session'] = session unless session.nil?
|
1156
|
+
command.query['fields'] = fields unless fields.nil?
|
1157
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1158
|
+
execute_or_queue_command(command, &block)
|
1159
|
+
end
|
1160
|
+
|
1161
|
+
# Commits a transaction. The request includes the mutations to be
|
1162
|
+
# applied to rows in the database.
|
1163
|
+
# `Commit` might return an `ABORTED` error. This can occur at any time;
|
1164
|
+
# commonly, the cause is conflicts with concurrent
|
1165
|
+
# transactions. However, it can also happen for a variety of other
|
1166
|
+
# reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
|
1167
|
+
# the transaction from the beginning, re-using the same session.
|
1168
|
+
# @param [String] session
|
1169
|
+
# Required. The session in which the transaction to be committed is running.
|
1170
|
+
# @param [Google::Apis::SpannerV1::CommitRequest] commit_request_object
|
1171
|
+
# @param [String] fields
|
1172
|
+
# Selector specifying which fields to include in a partial response.
|
1173
|
+
# @param [String] quota_user
|
1174
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1175
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1176
|
+
# @param [Google::Apis::RequestOptions] options
|
1177
|
+
# Request-specific options
|
1178
|
+
#
|
1179
|
+
# @yield [result, err] Result & error if block supplied
|
1180
|
+
# @yieldparam result [Google::Apis::SpannerV1::CommitResponse] parsed result object
|
1181
|
+
# @yieldparam err [StandardError] error object if request failed
|
1182
|
+
#
|
1183
|
+
# @return [Google::Apis::SpannerV1::CommitResponse]
|
1184
|
+
#
|
1185
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1186
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1187
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1188
|
+
def commit_session(session, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1189
|
+
command = make_simple_command(:post, 'v1/{+session}:commit', options)
|
1190
|
+
command.request_representation = Google::Apis::SpannerV1::CommitRequest::Representation
|
1191
|
+
command.request_object = commit_request_object
|
1192
|
+
command.response_representation = Google::Apis::SpannerV1::CommitResponse::Representation
|
1193
|
+
command.response_class = Google::Apis::SpannerV1::CommitResponse
|
1194
|
+
command.params['session'] = session unless session.nil?
|
1195
|
+
command.query['fields'] = fields unless fields.nil?
|
1196
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1197
|
+
execute_or_queue_command(command, &block)
|
1198
|
+
end
|
1199
|
+
|
1200
|
+
# Begins a new transaction. This step can often be skipped:
|
1201
|
+
# Read, ExecuteSql and
|
1202
|
+
# Commit can begin a new transaction as a
|
1203
|
+
# side-effect.
|
1204
|
+
# @param [String] session
|
1205
|
+
# Required. The session in which the transaction runs.
|
1206
|
+
# @param [Google::Apis::SpannerV1::BeginTransactionRequest] begin_transaction_request_object
|
1207
|
+
# @param [String] fields
|
1208
|
+
# Selector specifying which fields to include in a partial response.
|
1209
|
+
# @param [String] quota_user
|
1210
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1211
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1212
|
+
# @param [Google::Apis::RequestOptions] options
|
1213
|
+
# Request-specific options
|
1214
|
+
#
|
1215
|
+
# @yield [result, err] Result & error if block supplied
|
1216
|
+
# @yieldparam result [Google::Apis::SpannerV1::Transaction] parsed result object
|
1217
|
+
# @yieldparam err [StandardError] error object if request failed
|
1218
|
+
#
|
1219
|
+
# @return [Google::Apis::SpannerV1::Transaction]
|
1220
|
+
#
|
1221
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1222
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1223
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1224
|
+
def begin_session_transaction(session, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1225
|
+
command = make_simple_command(:post, 'v1/{+session}:beginTransaction', options)
|
1226
|
+
command.request_representation = Google::Apis::SpannerV1::BeginTransactionRequest::Representation
|
1227
|
+
command.request_object = begin_transaction_request_object
|
1228
|
+
command.response_representation = Google::Apis::SpannerV1::Transaction::Representation
|
1229
|
+
command.response_class = Google::Apis::SpannerV1::Transaction
|
1230
|
+
command.params['session'] = session unless session.nil?
|
1231
|
+
command.query['fields'] = fields unless fields.nil?
|
1232
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1233
|
+
execute_or_queue_command(command, &block)
|
1234
|
+
end
|
1235
|
+
|
1236
|
+
# Executes an SQL query, returning all rows in a single reply. This
|
1237
|
+
# method cannot be used to return a result set larger than 10 MiB;
|
1238
|
+
# if the query yields more data than that, the query fails with
|
1239
|
+
# a `FAILED_PRECONDITION` error.
|
1240
|
+
# Queries inside read-write transactions might return `ABORTED`. If
|
1241
|
+
# this occurs, the application should restart the transaction from
|
1242
|
+
# the beginning. See Transaction for more details.
|
1243
|
+
# Larger result sets can be fetched in streaming fashion by calling
|
1244
|
+
# ExecuteStreamingSql instead.
|
1245
|
+
# @param [String] session
|
1246
|
+
# Required. The session in which the SQL query should be performed.
|
1247
|
+
# @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object
|
1248
|
+
# @param [String] fields
|
1249
|
+
# Selector specifying which fields to include in a partial response.
|
1250
|
+
# @param [String] quota_user
|
1251
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1252
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1253
|
+
# @param [Google::Apis::RequestOptions] options
|
1254
|
+
# Request-specific options
|
1255
|
+
#
|
1256
|
+
# @yield [result, err] Result & error if block supplied
|
1257
|
+
# @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
|
1258
|
+
# @yieldparam err [StandardError] error object if request failed
|
1259
|
+
#
|
1260
|
+
# @return [Google::Apis::SpannerV1::ResultSet]
|
1261
|
+
#
|
1262
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1263
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1264
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1265
|
+
def execute_session_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1266
|
+
command = make_simple_command(:post, 'v1/{+session}:executeSql', options)
|
1267
|
+
command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation
|
1268
|
+
command.request_object = execute_sql_request_object
|
1269
|
+
command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
|
1270
|
+
command.response_class = Google::Apis::SpannerV1::ResultSet
|
1271
|
+
command.params['session'] = session unless session.nil?
|
1272
|
+
command.query['fields'] = fields unless fields.nil?
|
1273
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1274
|
+
execute_or_queue_command(command, &block)
|
1275
|
+
end
|
1276
|
+
|
1277
|
+
# Starts asynchronous cancellation on a long-running operation. The server
|
1278
|
+
# makes a best effort to cancel the operation, but success is not
|
1279
|
+
# guaranteed. If the server doesn't support this method, it returns
|
1280
|
+
# `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
1281
|
+
# Operations.GetOperation or
|
1282
|
+
# other methods to check whether the cancellation succeeded or whether the
|
1283
|
+
# operation completed despite cancellation. On successful cancellation,
|
1284
|
+
# the operation is not deleted; instead, it becomes an operation with
|
1285
|
+
# an Operation.error value with a google.rpc.Status.code of 1,
|
1286
|
+
# corresponding to `Code.CANCELLED`.
|
1287
|
+
# @param [String] name
|
1288
|
+
# The name of the operation resource to be cancelled.
|
1289
|
+
# @param [String] fields
|
1290
|
+
# Selector specifying which fields to include in a partial response.
|
1291
|
+
# @param [String] quota_user
|
1292
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1293
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1294
|
+
# @param [Google::Apis::RequestOptions] options
|
1295
|
+
# Request-specific options
|
1296
|
+
#
|
1297
|
+
# @yield [result, err] Result & error if block supplied
|
1298
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
1299
|
+
# @yieldparam err [StandardError] error object if request failed
|
1300
|
+
#
|
1301
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
1302
|
+
#
|
1303
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1304
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1305
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1306
|
+
def cancel_project_instance_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
1307
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
1308
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
1309
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
1310
|
+
command.params['name'] = name unless name.nil?
|
1311
|
+
command.query['fields'] = fields unless fields.nil?
|
1312
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1313
|
+
execute_or_queue_command(command, &block)
|
1314
|
+
end
|
1315
|
+
|
1316
|
+
# Deletes a long-running operation. This method indicates that the client is
|
1317
|
+
# no longer interested in the operation result. It does not cancel the
|
1318
|
+
# operation. If the server doesn't support this method, it returns
|
1319
|
+
# `google.rpc.Code.UNIMPLEMENTED`.
|
1320
|
+
# @param [String] name
|
1321
|
+
# The name of the operation resource to be deleted.
|
1322
|
+
# @param [String] fields
|
1323
|
+
# Selector specifying which fields to include in a partial response.
|
1324
|
+
# @param [String] quota_user
|
1325
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1326
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1327
|
+
# @param [Google::Apis::RequestOptions] options
|
1328
|
+
# Request-specific options
|
1329
|
+
#
|
1330
|
+
# @yield [result, err] Result & error if block supplied
|
1331
|
+
# @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
|
1332
|
+
# @yieldparam err [StandardError] error object if request failed
|
1333
|
+
#
|
1334
|
+
# @return [Google::Apis::SpannerV1::Empty]
|
1335
|
+
#
|
1336
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1337
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1338
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1339
|
+
def delete_project_instance_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
1340
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
1341
|
+
command.response_representation = Google::Apis::SpannerV1::Empty::Representation
|
1342
|
+
command.response_class = Google::Apis::SpannerV1::Empty
|
1343
|
+
command.params['name'] = name unless name.nil?
|
1344
|
+
command.query['fields'] = fields unless fields.nil?
|
1345
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1346
|
+
execute_or_queue_command(command, &block)
|
1347
|
+
end
|
1348
|
+
|
1349
|
+
# Lists operations that match the specified filter in the request. If the
|
1350
|
+
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
1351
|
+
# NOTE: the `name` binding below allows API services to override the binding
|
1352
|
+
# to use different resource name schemes, such as `users/*/operations`.
|
1353
|
+
# @param [String] name
|
1354
|
+
# The name of the operation collection.
|
1355
|
+
# @param [String] page_token
|
1356
|
+
# The standard list page token.
|
1357
|
+
# @param [Fixnum] page_size
|
1358
|
+
# The standard list page size.
|
1359
|
+
# @param [String] filter
|
1360
|
+
# The standard list filter.
|
1361
|
+
# @param [String] fields
|
1362
|
+
# Selector specifying which fields to include in a partial response.
|
1363
|
+
# @param [String] quota_user
|
1364
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1365
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1366
|
+
# @param [Google::Apis::RequestOptions] options
|
1367
|
+
# Request-specific options
|
1368
|
+
#
|
1369
|
+
# @yield [result, err] Result & error if block supplied
|
1370
|
+
# @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object
|
1371
|
+
# @yieldparam err [StandardError] error object if request failed
|
1372
|
+
#
|
1373
|
+
# @return [Google::Apis::SpannerV1::ListOperationsResponse]
|
1374
|
+
#
|
1375
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1376
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1377
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1378
|
+
def list_project_instance_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1379
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
1380
|
+
command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
|
1381
|
+
command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
|
1382
|
+
command.params['name'] = name unless name.nil?
|
1383
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1384
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1385
|
+
command.query['filter'] = filter unless filter.nil?
|
1386
|
+
command.query['fields'] = fields unless fields.nil?
|
1387
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1388
|
+
execute_or_queue_command(command, &block)
|
1389
|
+
end
|
1390
|
+
|
1391
|
+
# Gets the latest state of a long-running operation. Clients can use this
|
1392
|
+
# method to poll the operation result at intervals as recommended by the API
|
1393
|
+
# service.
|
1394
|
+
# @param [String] name
|
1395
|
+
# The name of the operation resource.
|
1396
|
+
# @param [String] fields
|
1397
|
+
# Selector specifying which fields to include in a partial response.
|
1398
|
+
# @param [String] quota_user
|
1399
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1400
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1401
|
+
# @param [Google::Apis::RequestOptions] options
|
1402
|
+
# Request-specific options
|
1403
|
+
#
|
1404
|
+
# @yield [result, err] Result & error if block supplied
|
1405
|
+
# @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
|
1406
|
+
# @yieldparam err [StandardError] error object if request failed
|
1407
|
+
#
|
1408
|
+
# @return [Google::Apis::SpannerV1::Operation]
|
1409
|
+
#
|
1410
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1411
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1412
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1413
|
+
def get_project_instance_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
1414
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
1415
|
+
command.response_representation = Google::Apis::SpannerV1::Operation::Representation
|
1416
|
+
command.response_class = Google::Apis::SpannerV1::Operation
|
1417
|
+
command.params['name'] = name unless name.nil?
|
1418
|
+
command.query['fields'] = fields unless fields.nil?
|
1419
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1420
|
+
execute_or_queue_command(command, &block)
|
1421
|
+
end
|
1422
|
+
|
1423
|
+
# Lists the supported instance configurations for a given project.
|
1424
|
+
# @param [String] parent
|
1425
|
+
# Required. The name of the project for which a list of supported instance
|
1426
|
+
# configurations is requested. Values are of the form
|
1427
|
+
# `projects/<project>`.
|
1428
|
+
# @param [String] page_token
|
1429
|
+
# If non-empty, `page_token` should contain a
|
1430
|
+
# next_page_token
|
1431
|
+
# from a previous ListInstanceConfigsResponse.
|
1432
|
+
# @param [Fixnum] page_size
|
1433
|
+
# Number of instance configurations to be returned in the response. If 0 or
|
1434
|
+
# less, defaults to the server's maximum allowed page size.
|
1435
|
+
# @param [String] fields
|
1436
|
+
# Selector specifying which fields to include in a partial response.
|
1437
|
+
# @param [String] quota_user
|
1438
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1439
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1440
|
+
# @param [Google::Apis::RequestOptions] options
|
1441
|
+
# Request-specific options
|
1442
|
+
#
|
1443
|
+
# @yield [result, err] Result & error if block supplied
|
1444
|
+
# @yieldparam result [Google::Apis::SpannerV1::ListInstanceConfigsResponse] parsed result object
|
1445
|
+
# @yieldparam err [StandardError] error object if request failed
|
1446
|
+
#
|
1447
|
+
# @return [Google::Apis::SpannerV1::ListInstanceConfigsResponse]
|
1448
|
+
#
|
1449
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1450
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1451
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1452
|
+
def list_project_instance_configs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1453
|
+
command = make_simple_command(:get, 'v1/{+parent}/instanceConfigs', options)
|
1454
|
+
command.response_representation = Google::Apis::SpannerV1::ListInstanceConfigsResponse::Representation
|
1455
|
+
command.response_class = Google::Apis::SpannerV1::ListInstanceConfigsResponse
|
1456
|
+
command.params['parent'] = parent unless parent.nil?
|
1457
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1458
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1459
|
+
command.query['fields'] = fields unless fields.nil?
|
1460
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1461
|
+
execute_or_queue_command(command, &block)
|
1462
|
+
end
|
1463
|
+
|
1464
|
+
# Gets information about a particular instance configuration.
|
1465
|
+
# @param [String] name
|
1466
|
+
# Required. The name of the requested instance configuration. Values are of
|
1467
|
+
# the form `projects/<project>/instanceConfigs/<config>`.
|
1468
|
+
# @param [String] fields
|
1469
|
+
# Selector specifying which fields to include in a partial response.
|
1470
|
+
# @param [String] quota_user
|
1471
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1472
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1473
|
+
# @param [Google::Apis::RequestOptions] options
|
1474
|
+
# Request-specific options
|
1475
|
+
#
|
1476
|
+
# @yield [result, err] Result & error if block supplied
|
1477
|
+
# @yieldparam result [Google::Apis::SpannerV1::InstanceConfig] parsed result object
|
1478
|
+
# @yieldparam err [StandardError] error object if request failed
|
1479
|
+
#
|
1480
|
+
# @return [Google::Apis::SpannerV1::InstanceConfig]
|
1481
|
+
#
|
1482
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1483
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1484
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1485
|
+
def get_project_instance_config(name, fields: nil, quota_user: nil, options: nil, &block)
|
1486
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
1487
|
+
command.response_representation = Google::Apis::SpannerV1::InstanceConfig::Representation
|
1488
|
+
command.response_class = Google::Apis::SpannerV1::InstanceConfig
|
1489
|
+
command.params['name'] = name unless name.nil?
|
1490
|
+
command.query['fields'] = fields unless fields.nil?
|
1491
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1492
|
+
execute_or_queue_command(command, &block)
|
1493
|
+
end
|
1494
|
+
|
1495
|
+
protected
|
1496
|
+
|
1497
|
+
def apply_command_defaults(command)
|
1498
|
+
command.query['key'] = key unless key.nil?
|
1499
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1500
|
+
end
|
1501
|
+
end
|
1502
|
+
end
|
1503
|
+
end
|
1504
|
+
end
|