google-api-client 0.32.1 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +159 -0
  3. data/README.md +1 -1
  4. data/generated/google/apis/accessapproval_v1beta1/classes.rb +35 -2
  5. data/generated/google/apis/accessapproval_v1beta1/representations.rb +13 -0
  6. data/generated/google/apis/accessapproval_v1beta1/service.rb +108 -6
  7. data/generated/google/apis/accessapproval_v1beta1.rb +1 -1
  8. data/generated/google/apis/accesscontextmanager_v1/classes.rb +1 -1
  9. data/generated/google/apis/accesscontextmanager_v1.rb +1 -1
  10. data/generated/google/apis/accesscontextmanager_v1beta/classes.rb +1 -73
  11. data/generated/google/apis/accesscontextmanager_v1beta/representations.rb +0 -32
  12. data/generated/google/apis/accesscontextmanager_v1beta.rb +1 -1
  13. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  14. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +15 -2
  15. data/generated/google/apis/adexchangebuyer_v1_3.rb +1 -1
  16. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +16 -3
  17. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  18. data/generated/google/apis/admin_datatransfer_v1/classes.rb +5 -5
  19. data/generated/google/apis/admin_datatransfer_v1/service.rb +2 -2
  20. data/generated/google/apis/admin_datatransfer_v1.rb +1 -1
  21. data/generated/google/apis/admin_directory_v1/classes.rb +4 -3
  22. data/generated/google/apis/admin_directory_v1.rb +4 -1
  23. data/generated/google/apis/admin_reports_v1/classes.rb +87 -44
  24. data/generated/google/apis/admin_reports_v1/service.rb +310 -64
  25. data/generated/google/apis/admin_reports_v1.rb +2 -2
  26. data/generated/google/apis/androidpublisher_v3/classes.rb +12 -0
  27. data/generated/google/apis/androidpublisher_v3/representations.rb +2 -0
  28. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  29. data/generated/google/apis/appengine_v1/service.rb +10 -6
  30. data/generated/google/apis/appengine_v1.rb +1 -1
  31. data/generated/google/apis/appengine_v1beta/service.rb +10 -6
  32. data/generated/google/apis/appengine_v1beta.rb +1 -1
  33. data/generated/google/apis/bigquery_v2/classes.rb +25 -19
  34. data/generated/google/apis/bigquery_v2/representations.rb +2 -0
  35. data/generated/google/apis/bigquery_v2.rb +1 -1
  36. data/generated/google/apis/bigqueryconnection_v1beta1/service.rb +3 -2
  37. data/generated/google/apis/bigqueryconnection_v1beta1.rb +1 -1
  38. data/generated/google/apis/bigtableadmin_v2/classes.rb +62 -29
  39. data/generated/google/apis/bigtableadmin_v2.rb +1 -1
  40. data/generated/google/apis/binaryauthorization_v1/service.rb +2 -0
  41. data/generated/google/apis/binaryauthorization_v1.rb +1 -1
  42. data/generated/google/apis/binaryauthorization_v1beta1/service.rb +2 -0
  43. data/generated/google/apis/binaryauthorization_v1beta1.rb +1 -1
  44. data/generated/google/apis/civicinfo_v2/representations.rb +2 -2
  45. data/generated/google/apis/civicinfo_v2.rb +1 -1
  46. data/generated/google/apis/cloudasset_v1/classes.rb +14 -15
  47. data/generated/google/apis/cloudasset_v1/service.rb +1 -2
  48. data/generated/google/apis/cloudasset_v1.rb +1 -1
  49. data/generated/google/apis/cloudbilling_v1/classes.rb +65 -36
  50. data/generated/google/apis/cloudbilling_v1/representations.rb +0 -1
  51. data/generated/google/apis/cloudbilling_v1/service.rb +5 -3
  52. data/generated/google/apis/cloudbilling_v1.rb +1 -1
  53. data/generated/google/apis/clouddebugger_v2/service.rb +14 -14
  54. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  55. data/generated/google/apis/cloudfunctions_v1/service.rb +7 -3
  56. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  57. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +7 -0
  58. data/generated/google/apis/cloudfunctions_v1beta2/representations.rb +1 -0
  59. data/generated/google/apis/cloudfunctions_v1beta2/service.rb +10 -4
  60. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  61. data/generated/google/apis/cloudidentity_v1/classes.rb +11 -8
  62. data/generated/google/apis/cloudidentity_v1/service.rb +2 -1
  63. data/generated/google/apis/cloudidentity_v1.rb +1 -1
  64. data/generated/google/apis/cloudidentity_v1beta1/classes.rb +13 -10
  65. data/generated/google/apis/cloudidentity_v1beta1/service.rb +2 -1
  66. data/generated/google/apis/cloudidentity_v1beta1.rb +1 -1
  67. data/generated/google/apis/cloudkms_v1/service.rb +3 -0
  68. data/generated/google/apis/cloudkms_v1.rb +1 -1
  69. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +12 -12
  70. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  71. data/generated/google/apis/cloudresourcemanager_v2/classes.rb +4 -8
  72. data/generated/google/apis/cloudresourcemanager_v2/service.rb +11 -13
  73. data/generated/google/apis/cloudresourcemanager_v2.rb +1 -1
  74. data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +4 -8
  75. data/generated/google/apis/cloudresourcemanager_v2beta1/service.rb +11 -13
  76. data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
  77. data/generated/google/apis/cloudsearch_v1/classes.rb +5 -2
  78. data/generated/google/apis/cloudsearch_v1/service.rb +5 -2
  79. data/generated/google/apis/cloudsearch_v1.rb +1 -1
  80. data/generated/google/apis/cloudshell_v1/classes.rb +22 -0
  81. data/generated/google/apis/cloudshell_v1/representations.rb +3 -0
  82. data/generated/google/apis/cloudshell_v1.rb +1 -1
  83. data/generated/google/apis/cloudshell_v1alpha1/classes.rb +22 -0
  84. data/generated/google/apis/cloudshell_v1alpha1/representations.rb +3 -0
  85. data/generated/google/apis/cloudshell_v1alpha1.rb +1 -1
  86. data/generated/google/apis/compute_alpha/classes.rb +519 -152
  87. data/generated/google/apis/compute_alpha/representations.rb +108 -2
  88. data/generated/google/apis/compute_alpha/service.rb +1035 -640
  89. data/generated/google/apis/compute_alpha.rb +1 -1
  90. data/generated/google/apis/compute_beta/classes.rb +1016 -266
  91. data/generated/google/apis/compute_beta/representations.rb +284 -0
  92. data/generated/google/apis/compute_beta/service.rb +1242 -532
  93. data/generated/google/apis/compute_beta.rb +1 -1
  94. data/generated/google/apis/compute_v1/classes.rb +283 -125
  95. data/generated/google/apis/compute_v1/representations.rb +24 -0
  96. data/generated/google/apis/compute_v1/service.rb +759 -473
  97. data/generated/google/apis/compute_v1.rb +1 -1
  98. data/generated/google/apis/container_v1/classes.rb +207 -5
  99. data/generated/google/apis/container_v1/representations.rb +85 -0
  100. data/generated/google/apis/container_v1.rb +1 -1
  101. data/generated/google/apis/container_v1beta1/classes.rb +125 -3
  102. data/generated/google/apis/container_v1beta1/representations.rb +22 -0
  103. data/generated/google/apis/container_v1beta1.rb +1 -1
  104. data/generated/google/apis/content_v2/classes.rb +23 -220
  105. data/generated/google/apis/content_v2/representations.rb +0 -115
  106. data/generated/google/apis/content_v2/service.rb +0 -160
  107. data/generated/google/apis/content_v2.rb +1 -1
  108. data/generated/google/apis/content_v2_1/classes.rb +57 -18
  109. data/generated/google/apis/content_v2_1/representations.rb +3 -0
  110. data/generated/google/apis/content_v2_1.rb +1 -1
  111. data/generated/google/apis/dataflow_v1b3/classes.rb +6 -9
  112. data/generated/google/apis/dataflow_v1b3/representations.rb +1 -1
  113. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  114. data/generated/google/apis/datafusion_v1beta1/classes.rb +156 -46
  115. data/generated/google/apis/datafusion_v1beta1/representations.rb +33 -0
  116. data/generated/google/apis/datafusion_v1beta1/service.rb +10 -1
  117. data/generated/google/apis/datafusion_v1beta1.rb +1 -1
  118. data/generated/google/apis/datastore_v1/service.rb +85 -1
  119. data/generated/google/apis/datastore_v1.rb +1 -1
  120. data/generated/google/apis/datastore_v1beta3/service.rb +1 -1
  121. data/generated/google/apis/datastore_v1beta3.rb +1 -1
  122. data/generated/google/apis/dialogflow_v2/classes.rb +25 -7
  123. data/generated/google/apis/dialogflow_v2/representations.rb +2 -0
  124. data/generated/google/apis/dialogflow_v2.rb +1 -1
  125. data/generated/google/apis/dialogflow_v2beta1/classes.rb +33 -7
  126. data/generated/google/apis/dialogflow_v2beta1/representations.rb +3 -0
  127. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  128. data/generated/google/apis/dlp_v2/classes.rb +19 -11
  129. data/generated/google/apis/dlp_v2/representations.rb +1 -0
  130. data/generated/google/apis/dlp_v2/service.rb +43 -0
  131. data/generated/google/apis/dlp_v2.rb +1 -1
  132. data/generated/google/apis/docs_v1/classes.rb +175 -0
  133. data/generated/google/apis/docs_v1/representations.rb +77 -0
  134. data/generated/google/apis/docs_v1.rb +1 -1
  135. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  136. data/generated/google/apis/drive_v2/classes.rb +2 -1
  137. data/generated/google/apis/drive_v2/service.rb +3 -3
  138. data/generated/google/apis/drive_v2.rb +1 -1
  139. data/generated/google/apis/drive_v3.rb +1 -1
  140. data/generated/google/apis/firebasehosting_v1beta1/classes.rb +37 -0
  141. data/generated/google/apis/firebasehosting_v1beta1/representations.rb +16 -0
  142. data/generated/google/apis/firebasehosting_v1beta1.rb +1 -1
  143. data/generated/google/apis/firestore_v1.rb +1 -1
  144. data/generated/google/apis/firestore_v1beta1.rb +1 -1
  145. data/generated/google/apis/fitness_v1/service.rb +1 -1
  146. data/generated/google/apis/fitness_v1.rb +1 -1
  147. data/generated/google/apis/games_management_v1management/classes.rb +6 -26
  148. data/generated/google/apis/games_management_v1management/representations.rb +1 -14
  149. data/generated/google/apis/games_management_v1management/service.rb +0 -158
  150. data/generated/google/apis/games_management_v1management.rb +1 -1
  151. data/generated/google/apis/games_v1/classes.rb +6 -292
  152. data/generated/google/apis/games_v1/representations.rb +1 -98
  153. data/generated/google/apis/games_v1/service.rb +0 -123
  154. data/generated/google/apis/games_v1.rb +1 -1
  155. data/generated/google/apis/healthcare_v1beta1/classes.rb +205 -9
  156. data/generated/google/apis/healthcare_v1beta1/representations.rb +101 -0
  157. data/generated/google/apis/healthcare_v1beta1/service.rb +198 -104
  158. data/generated/google/apis/healthcare_v1beta1.rb +1 -1
  159. data/generated/google/apis/iam_v1/classes.rb +9 -2
  160. data/generated/google/apis/iam_v1/representations.rb +1 -0
  161. data/generated/google/apis/iam_v1.rb +1 -1
  162. data/generated/google/apis/iap_v1/classes.rb +187 -2
  163. data/generated/google/apis/iap_v1/representations.rb +102 -0
  164. data/generated/google/apis/iap_v1/service.rb +72 -0
  165. data/generated/google/apis/iap_v1.rb +1 -1
  166. data/generated/google/apis/iap_v1beta1/classes.rb +2 -2
  167. data/generated/google/apis/iap_v1beta1.rb +1 -1
  168. data/generated/google/apis/jobs_v2/classes.rb +167 -0
  169. data/generated/google/apis/jobs_v2/representations.rb +40 -0
  170. data/generated/google/apis/jobs_v2.rb +1 -1
  171. data/generated/google/apis/jobs_v3/classes.rb +179 -0
  172. data/generated/google/apis/jobs_v3/representations.rb +41 -0
  173. data/generated/google/apis/jobs_v3.rb +1 -1
  174. data/generated/google/apis/jobs_v3p1beta1/classes.rb +179 -0
  175. data/generated/google/apis/jobs_v3p1beta1/representations.rb +41 -0
  176. data/generated/google/apis/jobs_v3p1beta1.rb +1 -1
  177. data/generated/google/apis/licensing_v1/classes.rb +15 -7
  178. data/generated/google/apis/licensing_v1/service.rb +81 -37
  179. data/generated/google/apis/licensing_v1.rb +4 -4
  180. data/generated/google/apis/lifesciences_v2beta/classes.rb +1329 -0
  181. data/generated/google/apis/lifesciences_v2beta/representations.rb +533 -0
  182. data/generated/google/apis/lifesciences_v2beta/service.rb +303 -0
  183. data/generated/google/apis/{urlshortener_v1.rb → lifesciences_v2beta.rb} +12 -11
  184. data/generated/google/apis/logging_v2/classes.rb +12 -0
  185. data/generated/google/apis/logging_v2/representations.rb +2 -0
  186. data/generated/google/apis/logging_v2/service.rb +10 -5
  187. data/generated/google/apis/logging_v2.rb +1 -1
  188. data/generated/google/apis/ml_v1/classes.rb +66 -23
  189. data/generated/google/apis/ml_v1/representations.rb +1 -0
  190. data/generated/google/apis/ml_v1/service.rb +7 -3
  191. data/generated/google/apis/ml_v1.rb +2 -2
  192. data/generated/google/apis/monitoring_v1/classes.rb +260 -0
  193. data/generated/google/apis/monitoring_v1/representations.rb +123 -0
  194. data/generated/google/apis/monitoring_v1/service.rb +64 -0
  195. data/generated/google/apis/monitoring_v1.rb +36 -0
  196. data/generated/google/apis/monitoring_v3/classes.rb +27 -13
  197. data/generated/google/apis/monitoring_v3/representations.rb +1 -0
  198. data/generated/google/apis/monitoring_v3/service.rb +2 -2
  199. data/generated/google/apis/monitoring_v3.rb +1 -1
  200. data/generated/google/apis/oslogin_v1/classes.rb +1 -1
  201. data/generated/google/apis/oslogin_v1/service.rb +10 -6
  202. data/generated/google/apis/oslogin_v1.rb +1 -1
  203. data/generated/google/apis/oslogin_v1beta/classes.rb +1 -1
  204. data/generated/google/apis/oslogin_v1beta/service.rb +9 -5
  205. data/generated/google/apis/oslogin_v1beta.rb +1 -1
  206. data/generated/google/apis/people_v1/classes.rb +67 -63
  207. data/generated/google/apis/people_v1/service.rb +53 -44
  208. data/generated/google/apis/people_v1.rb +1 -1
  209. data/generated/google/apis/policytroubleshooter_v1beta/classes.rb +5 -4
  210. data/generated/google/apis/policytroubleshooter_v1beta.rb +1 -1
  211. data/generated/google/apis/pubsub_v1/service.rb +3 -0
  212. data/generated/google/apis/pubsub_v1.rb +1 -1
  213. data/generated/google/apis/pubsub_v1beta2/service.rb +2 -0
  214. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  215. data/generated/google/apis/remotebuildexecution_v1/classes.rb +24 -0
  216. data/generated/google/apis/remotebuildexecution_v1/representations.rb +4 -0
  217. data/generated/google/apis/remotebuildexecution_v1.rb +1 -1
  218. data/generated/google/apis/remotebuildexecution_v1alpha/classes.rb +24 -0
  219. data/generated/google/apis/remotebuildexecution_v1alpha/representations.rb +4 -0
  220. data/generated/google/apis/remotebuildexecution_v1alpha.rb +1 -1
  221. data/generated/google/apis/remotebuildexecution_v2/classes.rb +24 -0
  222. data/generated/google/apis/remotebuildexecution_v2/representations.rb +4 -0
  223. data/generated/google/apis/remotebuildexecution_v2.rb +1 -1
  224. data/generated/google/apis/reseller_v1/service.rb +1 -1
  225. data/generated/google/apis/reseller_v1.rb +1 -1
  226. data/generated/google/apis/run_v1/classes.rb +0 -7
  227. data/generated/google/apis/run_v1/service.rb +156 -94
  228. data/generated/google/apis/run_v1.rb +1 -1
  229. data/generated/google/apis/run_v1alpha1/classes.rb +319 -0
  230. data/generated/google/apis/run_v1alpha1/representations.rb +126 -0
  231. data/generated/google/apis/run_v1alpha1/service.rb +408 -0
  232. data/generated/google/apis/run_v1alpha1.rb +1 -1
  233. data/generated/google/apis/securitycenter_v1/classes.rb +2 -2
  234. data/generated/google/apis/securitycenter_v1.rb +1 -1
  235. data/generated/google/apis/securitycenter_v1beta1/classes.rb +2 -2
  236. data/generated/google/apis/securitycenter_v1beta1.rb +1 -1
  237. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +63 -0
  238. data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +30 -0
  239. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  240. data/generated/google/apis/servicecontrol_v1/classes.rb +0 -11
  241. data/generated/google/apis/servicecontrol_v1/representations.rb +0 -1
  242. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  243. data/generated/google/apis/servicemanagement_v1/classes.rb +33 -7
  244. data/generated/google/apis/servicemanagement_v1/representations.rb +24 -0
  245. data/generated/google/apis/servicemanagement_v1/service.rb +31 -17
  246. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  247. data/generated/google/apis/serviceusage_v1/classes.rb +55 -0
  248. data/generated/google/apis/serviceusage_v1/representations.rb +29 -0
  249. data/generated/google/apis/serviceusage_v1.rb +1 -1
  250. data/generated/google/apis/serviceusage_v1beta1/classes.rb +55 -0
  251. data/generated/google/apis/serviceusage_v1beta1/representations.rb +29 -0
  252. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  253. data/generated/google/apis/sheets_v4/classes.rb +389 -0
  254. data/generated/google/apis/sheets_v4/representations.rb +79 -0
  255. data/generated/google/apis/sheets_v4.rb +1 -1
  256. data/generated/google/apis/{speech_v2beta → speech_v2beta1}/classes.rb +9 -8
  257. data/generated/google/apis/{speech_v2beta → speech_v2beta1}/representations.rb +6 -6
  258. data/generated/google/apis/{speech_v2beta → speech_v2beta1}/service.rb +13 -13
  259. data/generated/google/apis/{speech_v2beta.rb → speech_v2beta1.rb} +6 -6
  260. data/generated/google/apis/sql_v1beta4/classes.rb +2752 -0
  261. data/generated/google/apis/sql_v1beta4/representations.rb +1131 -0
  262. data/generated/google/apis/sql_v1beta4/service.rb +1791 -0
  263. data/generated/google/apis/sql_v1beta4.rb +37 -0
  264. data/generated/google/apis/storage_v1.rb +1 -1
  265. data/generated/google/apis/testing_v1/classes.rb +142 -1
  266. data/generated/google/apis/testing_v1/representations.rb +76 -0
  267. data/generated/google/apis/testing_v1.rb +1 -1
  268. data/generated/google/apis/videointelligence_v1/classes.rb +35 -36
  269. data/generated/google/apis/videointelligence_v1.rb +1 -1
  270. data/generated/google/apis/videointelligence_v1beta2/classes.rb +35 -36
  271. data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
  272. data/generated/google/apis/videointelligence_v1p1beta1/classes.rb +35 -36
  273. data/generated/google/apis/videointelligence_v1p1beta1.rb +1 -1
  274. data/generated/google/apis/videointelligence_v1p2beta1/classes.rb +35 -36
  275. data/generated/google/apis/videointelligence_v1p2beta1.rb +1 -1
  276. data/generated/google/apis/videointelligence_v1p3beta1/classes.rb +35 -36
  277. data/generated/google/apis/videointelligence_v1p3beta1.rb +1 -1
  278. data/generated/google/apis/vision_v1.rb +1 -1
  279. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  280. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  281. data/generated/google/apis/youtube_partner_v1/service.rb +2 -2
  282. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  283. data/google-api-client.gemspec +6 -3
  284. data/lib/google/apis/version.rb +1 -1
  285. metadata +28 -30
  286. data/generated/google/apis/dfareporting_v3_2/classes.rb +0 -12299
  287. data/generated/google/apis/dfareporting_v3_2/representations.rb +0 -4397
  288. data/generated/google/apis/dfareporting_v3_2/service.rb +0 -8793
  289. data/generated/google/apis/dfareporting_v3_2.rb +0 -40
  290. data/generated/google/apis/urlshortener_v1/classes.rb +0 -246
  291. data/generated/google/apis/urlshortener_v1/representations.rb +0 -121
  292. data/generated/google/apis/urlshortener_v1/service.rb +0 -169
@@ -0,0 +1,1791 @@
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 SqlV1beta4
23
+ # Cloud SQL Admin API
24
+ #
25
+ # API for Cloud SQL database instance management
26
+ #
27
+ # @example
28
+ # require 'google/apis/sql_v1beta4'
29
+ #
30
+ # Sql = Google::Apis::SqlV1beta4 # Alias the module
31
+ # service = Sql::SQLAdminService.new
32
+ #
33
+ # @see https://developers.google.com/cloud-sql/
34
+ class SQLAdminService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://sqladmin.googleapis.com/', '')
47
+ @batch_path = 'batch'
48
+ end
49
+
50
+ # Deletes the backup taken by a backup run.
51
+ # @param [String] project
52
+ # Project ID of the project that contains the instance.
53
+ # @param [String] instance
54
+ # Cloud SQL instance ID. This does not include the project ID.
55
+ # @param [Fixnum] id
56
+ # The ID of the Backup Run to delete. To find a Backup Run ID, use the <a
57
+ # href="/sql/docs/db_path/admin-api/rest/v1beta4/backupRuns/list">list</a>
58
+ # method.
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # @param [Google::Apis::RequestOptions] options
65
+ # Request-specific options
66
+ #
67
+ # @yield [result, err] Result & error if block supplied
68
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
69
+ # @yieldparam err [StandardError] error object if request failed
70
+ #
71
+ # @return [Google::Apis::SqlV1beta4::Operation]
72
+ #
73
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
76
+ def delete_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil, &block)
77
+ command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', options)
78
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
79
+ command.response_class = Google::Apis::SqlV1beta4::Operation
80
+ command.params['project'] = project unless project.nil?
81
+ command.params['instance'] = instance unless instance.nil?
82
+ command.params['id'] = id unless id.nil?
83
+ command.query['fields'] = fields unless fields.nil?
84
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
85
+ execute_or_queue_command(command, &block)
86
+ end
87
+
88
+ # Retrieves a resource containing information about a backup run.
89
+ # @param [String] project
90
+ # Project ID of the project that contains the instance.
91
+ # @param [String] instance
92
+ # Cloud SQL instance ID. This does not include the project ID.
93
+ # @param [Fixnum] id
94
+ # The ID of this Backup Run.
95
+ # @param [String] resource_name
96
+ # Name of the resource backupRun.
97
+ # Format:
98
+ # projects/`project`/locations/`location`/instances/`instance`/backupRuns/`
99
+ # backupRun`
100
+ # @param [String] fields
101
+ # Selector specifying which fields to include in a partial response.
102
+ # @param [String] quota_user
103
+ # Available to use for quota purposes for server-side applications. Can be any
104
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
105
+ # @param [Google::Apis::RequestOptions] options
106
+ # Request-specific options
107
+ #
108
+ # @yield [result, err] Result & error if block supplied
109
+ # @yieldparam result [Google::Apis::SqlV1beta4::BackupRun] parsed result object
110
+ # @yieldparam err [StandardError] error object if request failed
111
+ #
112
+ # @return [Google::Apis::SqlV1beta4::BackupRun]
113
+ #
114
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
115
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
116
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
117
+ def get_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
118
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', options)
119
+ command.response_representation = Google::Apis::SqlV1beta4::BackupRun::Representation
120
+ command.response_class = Google::Apis::SqlV1beta4::BackupRun
121
+ command.params['project'] = project unless project.nil?
122
+ command.params['instance'] = instance unless instance.nil?
123
+ command.params['id'] = id unless id.nil?
124
+ command.query['resourceName'] = resource_name unless resource_name.nil?
125
+ command.query['fields'] = fields unless fields.nil?
126
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
127
+ execute_or_queue_command(command, &block)
128
+ end
129
+
130
+ # Creates a new backup run on demand. This method is applicable only to
131
+ # Second Generation instances.
132
+ # @param [String] project
133
+ # Project ID of the project that contains the instance.
134
+ # @param [String] instance
135
+ # Cloud SQL instance ID. This does not include the project ID.
136
+ # @param [Google::Apis::SqlV1beta4::BackupRun] backup_run_object
137
+ # @param [String] parent
138
+ # The parent resource where Cloud SQL should create this backupRun.
139
+ # Format: projects/`project`/locations/`location`/instances/`instance`
140
+ # @param [String] fields
141
+ # Selector specifying which fields to include in a partial response.
142
+ # @param [String] quota_user
143
+ # Available to use for quota purposes for server-side applications. Can be any
144
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
145
+ # @param [Google::Apis::RequestOptions] options
146
+ # Request-specific options
147
+ #
148
+ # @yield [result, err] Result & error if block supplied
149
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
150
+ # @yieldparam err [StandardError] error object if request failed
151
+ #
152
+ # @return [Google::Apis::SqlV1beta4::Operation]
153
+ #
154
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
155
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
156
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
157
+ def insert_backup_run(project, instance, backup_run_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
158
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', options)
159
+ command.request_representation = Google::Apis::SqlV1beta4::BackupRun::Representation
160
+ command.request_object = backup_run_object
161
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
162
+ command.response_class = Google::Apis::SqlV1beta4::Operation
163
+ command.params['project'] = project unless project.nil?
164
+ command.params['instance'] = instance unless instance.nil?
165
+ command.query['parent'] = parent unless parent.nil?
166
+ command.query['fields'] = fields unless fields.nil?
167
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
168
+ execute_or_queue_command(command, &block)
169
+ end
170
+
171
+ # Lists all backup runs associated with a given instance and configuration in
172
+ # the reverse chronological order of the backup initiation time.
173
+ # @param [String] project
174
+ # Project ID of the project that contains the instance.
175
+ # @param [String] instance
176
+ # Cloud SQL instance ID. This does not include the project ID.
177
+ # @param [Fixnum] max_results
178
+ # Maximum number of backup runs per response.
179
+ # @param [String] page_token
180
+ # A previously-returned page token representing part of the larger set of
181
+ # results to view.
182
+ # @param [String] parent
183
+ # The parent, which owns this collection of backupRuns.
184
+ # Format: projects/`project`/locations/`location`/instances/`instance`
185
+ # @param [String] fields
186
+ # Selector specifying which fields to include in a partial response.
187
+ # @param [String] quota_user
188
+ # Available to use for quota purposes for server-side applications. Can be any
189
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
190
+ # @param [Google::Apis::RequestOptions] options
191
+ # Request-specific options
192
+ #
193
+ # @yield [result, err] Result & error if block supplied
194
+ # @yieldparam result [Google::Apis::SqlV1beta4::BackupRunsListResponse] parsed result object
195
+ # @yieldparam err [StandardError] error object if request failed
196
+ #
197
+ # @return [Google::Apis::SqlV1beta4::BackupRunsListResponse]
198
+ #
199
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
200
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
201
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
202
+ def list_backup_runs(project, instance, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
203
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', options)
204
+ command.response_representation = Google::Apis::SqlV1beta4::BackupRunsListResponse::Representation
205
+ command.response_class = Google::Apis::SqlV1beta4::BackupRunsListResponse
206
+ command.params['project'] = project unless project.nil?
207
+ command.params['instance'] = instance unless instance.nil?
208
+ command.query['maxResults'] = max_results unless max_results.nil?
209
+ command.query['pageToken'] = page_token unless page_token.nil?
210
+ command.query['parent'] = parent unless parent.nil?
211
+ command.query['fields'] = fields unless fields.nil?
212
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
213
+ execute_or_queue_command(command, &block)
214
+ end
215
+
216
+ # Deletes a database from a Cloud SQL instance.
217
+ # @param [String] project
218
+ # Project ID of the project that contains the instance.
219
+ # @param [String] instance
220
+ # Database instance ID. This does not include the project ID.
221
+ # @param [String] database
222
+ # Name of the database to be deleted in the instance.
223
+ # @param [String] fields
224
+ # Selector specifying which fields to include in a partial response.
225
+ # @param [String] quota_user
226
+ # Available to use for quota purposes for server-side applications. Can be any
227
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
228
+ # @param [Google::Apis::RequestOptions] options
229
+ # Request-specific options
230
+ #
231
+ # @yield [result, err] Result & error if block supplied
232
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
233
+ # @yieldparam err [StandardError] error object if request failed
234
+ #
235
+ # @return [Google::Apis::SqlV1beta4::Operation]
236
+ #
237
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
238
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
239
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
240
+ def delete_database(project, instance, database, fields: nil, quota_user: nil, options: nil, &block)
241
+ command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
242
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
243
+ command.response_class = Google::Apis::SqlV1beta4::Operation
244
+ command.params['project'] = project unless project.nil?
245
+ command.params['instance'] = instance unless instance.nil?
246
+ command.params['database'] = database unless database.nil?
247
+ command.query['fields'] = fields unless fields.nil?
248
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
249
+ execute_or_queue_command(command, &block)
250
+ end
251
+
252
+ # Retrieves a resource containing information about a database inside a Cloud
253
+ # SQL instance.
254
+ # @param [String] project
255
+ # Project ID of the project that contains the instance.
256
+ # @param [String] instance
257
+ # Database instance ID. This does not include the project ID.
258
+ # @param [String] database
259
+ # Name of the database in the instance.
260
+ # @param [String] resource_name
261
+ # Name of the resource database.
262
+ # Format:
263
+ # projects/`project`/locations/`location`/instances/`instance`/databases/`
264
+ # database`
265
+ # @param [String] fields
266
+ # Selector specifying which fields to include in a partial response.
267
+ # @param [String] quota_user
268
+ # Available to use for quota purposes for server-side applications. Can be any
269
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
270
+ # @param [Google::Apis::RequestOptions] options
271
+ # Request-specific options
272
+ #
273
+ # @yield [result, err] Result & error if block supplied
274
+ # @yieldparam result [Google::Apis::SqlV1beta4::Database] parsed result object
275
+ # @yieldparam err [StandardError] error object if request failed
276
+ #
277
+ # @return [Google::Apis::SqlV1beta4::Database]
278
+ #
279
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
280
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
281
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
282
+ def get_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
283
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
284
+ command.response_representation = Google::Apis::SqlV1beta4::Database::Representation
285
+ command.response_class = Google::Apis::SqlV1beta4::Database
286
+ command.params['project'] = project unless project.nil?
287
+ command.params['instance'] = instance unless instance.nil?
288
+ command.params['database'] = database unless database.nil?
289
+ command.query['resourceName'] = resource_name unless resource_name.nil?
290
+ command.query['fields'] = fields unless fields.nil?
291
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
292
+ execute_or_queue_command(command, &block)
293
+ end
294
+
295
+ # Inserts a resource containing information about a database inside a Cloud
296
+ # SQL instance.
297
+ # @param [String] project
298
+ # Project ID of the project that contains the instance.
299
+ # @param [String] instance
300
+ # Database instance ID. This does not include the project ID.
301
+ # @param [Google::Apis::SqlV1beta4::Database] database_object
302
+ # @param [String] parent
303
+ # The parent resource where Cloud SQL should add this database.
304
+ # Format: projects/`project`/locations/`location`/instances/`instance`
305
+ # @param [String] fields
306
+ # Selector specifying which fields to include in a partial response.
307
+ # @param [String] quota_user
308
+ # Available to use for quota purposes for server-side applications. Can be any
309
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
310
+ # @param [Google::Apis::RequestOptions] options
311
+ # Request-specific options
312
+ #
313
+ # @yield [result, err] Result & error if block supplied
314
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
315
+ # @yieldparam err [StandardError] error object if request failed
316
+ #
317
+ # @return [Google::Apis::SqlV1beta4::Operation]
318
+ #
319
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
320
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
321
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
322
+ def insert_database(project, instance, database_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
323
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', options)
324
+ command.request_representation = Google::Apis::SqlV1beta4::Database::Representation
325
+ command.request_object = database_object
326
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
327
+ command.response_class = Google::Apis::SqlV1beta4::Operation
328
+ command.params['project'] = project unless project.nil?
329
+ command.params['instance'] = instance unless instance.nil?
330
+ command.query['parent'] = parent unless parent.nil?
331
+ command.query['fields'] = fields unless fields.nil?
332
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
333
+ execute_or_queue_command(command, &block)
334
+ end
335
+
336
+ # Lists databases in the specified Cloud SQL instance.
337
+ # @param [String] project
338
+ # Project ID of the project that contains the instance.
339
+ # @param [String] instance
340
+ # Cloud SQL instance ID. This does not include the project ID.
341
+ # @param [String] parent
342
+ # The parent, which owns this collection of databases.
343
+ # Format: projects/`project`/locations/`location`/instances/`instance`
344
+ # @param [String] fields
345
+ # Selector specifying which fields to include in a partial response.
346
+ # @param [String] quota_user
347
+ # Available to use for quota purposes for server-side applications. Can be any
348
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
349
+ # @param [Google::Apis::RequestOptions] options
350
+ # Request-specific options
351
+ #
352
+ # @yield [result, err] Result & error if block supplied
353
+ # @yieldparam result [Google::Apis::SqlV1beta4::DatabasesListResponse] parsed result object
354
+ # @yieldparam err [StandardError] error object if request failed
355
+ #
356
+ # @return [Google::Apis::SqlV1beta4::DatabasesListResponse]
357
+ #
358
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
359
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
360
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
361
+ def list_databases(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
362
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', options)
363
+ command.response_representation = Google::Apis::SqlV1beta4::DatabasesListResponse::Representation
364
+ command.response_class = Google::Apis::SqlV1beta4::DatabasesListResponse
365
+ command.params['project'] = project unless project.nil?
366
+ command.params['instance'] = instance unless instance.nil?
367
+ command.query['parent'] = parent unless parent.nil?
368
+ command.query['fields'] = fields unless fields.nil?
369
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
370
+ execute_or_queue_command(command, &block)
371
+ end
372
+
373
+ # Partially updates a resource containing information about a database inside
374
+ # a Cloud SQL instance. This method supports patch semantics.
375
+ # @param [String] project
376
+ # Project ID of the project that contains the instance.
377
+ # @param [String] instance
378
+ # Database instance ID. This does not include the project ID.
379
+ # @param [String] database
380
+ # Name of the database to be updated in the instance.
381
+ # @param [Google::Apis::SqlV1beta4::Database] database_object
382
+ # @param [String] fields
383
+ # Selector specifying which fields to include in a partial response.
384
+ # @param [String] quota_user
385
+ # Available to use for quota purposes for server-side applications. Can be any
386
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
387
+ # @param [Google::Apis::RequestOptions] options
388
+ # Request-specific options
389
+ #
390
+ # @yield [result, err] Result & error if block supplied
391
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
392
+ # @yieldparam err [StandardError] error object if request failed
393
+ #
394
+ # @return [Google::Apis::SqlV1beta4::Operation]
395
+ #
396
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
397
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
398
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
399
+ def patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil, &block)
400
+ command = make_simple_command(:patch, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
401
+ command.request_representation = Google::Apis::SqlV1beta4::Database::Representation
402
+ command.request_object = database_object
403
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
404
+ command.response_class = Google::Apis::SqlV1beta4::Operation
405
+ command.params['project'] = project unless project.nil?
406
+ command.params['instance'] = instance unless instance.nil?
407
+ command.params['database'] = database unless database.nil?
408
+ command.query['fields'] = fields unless fields.nil?
409
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
410
+ execute_or_queue_command(command, &block)
411
+ end
412
+
413
+ # Updates a resource containing information about a database inside a Cloud
414
+ # SQL instance.
415
+ # @param [String] project
416
+ # Project ID of the project that contains the instance.
417
+ # @param [String] instance
418
+ # Database instance ID. This does not include the project ID.
419
+ # @param [String] database
420
+ # Name of the database to be updated in the instance.
421
+ # @param [Google::Apis::SqlV1beta4::Database] database_object
422
+ # @param [String] fields
423
+ # Selector specifying which fields to include in a partial response.
424
+ # @param [String] quota_user
425
+ # Available to use for quota purposes for server-side applications. Can be any
426
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
427
+ # @param [Google::Apis::RequestOptions] options
428
+ # Request-specific options
429
+ #
430
+ # @yield [result, err] Result & error if block supplied
431
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
432
+ # @yieldparam err [StandardError] error object if request failed
433
+ #
434
+ # @return [Google::Apis::SqlV1beta4::Operation]
435
+ #
436
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
437
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
438
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
439
+ def update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil, &block)
440
+ command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
441
+ command.request_representation = Google::Apis::SqlV1beta4::Database::Representation
442
+ command.request_object = database_object
443
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
444
+ command.response_class = Google::Apis::SqlV1beta4::Operation
445
+ command.params['project'] = project unless project.nil?
446
+ command.params['instance'] = instance unless instance.nil?
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
+ # List all available database flags for Cloud SQL instances.
454
+ # @param [String] database_version
455
+ # Database type and version you want to retrieve flags for. By default, this
456
+ # method returns flags for all database types and versions.
457
+ # @param [String] fields
458
+ # Selector specifying which fields to include in a partial response.
459
+ # @param [String] quota_user
460
+ # Available to use for quota purposes for server-side applications. Can be any
461
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
462
+ # @param [Google::Apis::RequestOptions] options
463
+ # Request-specific options
464
+ #
465
+ # @yield [result, err] Result & error if block supplied
466
+ # @yieldparam result [Google::Apis::SqlV1beta4::FlagsListResponse] parsed result object
467
+ # @yieldparam err [StandardError] error object if request failed
468
+ #
469
+ # @return [Google::Apis::SqlV1beta4::FlagsListResponse]
470
+ #
471
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
472
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
473
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
474
+ def list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil, &block)
475
+ command = make_simple_command(:get, 'sql/v1beta4/flags', options)
476
+ command.response_representation = Google::Apis::SqlV1beta4::FlagsListResponse::Representation
477
+ command.response_class = Google::Apis::SqlV1beta4::FlagsListResponse
478
+ command.query['databaseVersion'] = database_version unless database_version.nil?
479
+ command.query['fields'] = fields unless fields.nil?
480
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
481
+ execute_or_queue_command(command, &block)
482
+ end
483
+
484
+ # Add a new trusted Certificate Authority (CA) version for the specified
485
+ # instance. Required to prepare for a certificate rotation. If a CA version
486
+ # was previously added but never used in a certificate rotation, this
487
+ # operation replaces that version. There cannot be more than one CA version
488
+ # waiting to be rotated in.
489
+ # @param [String] project
490
+ # Project ID of the project that contains the instance.
491
+ # @param [String] instance
492
+ # Cloud SQL instance ID. This does not include the project ID.
493
+ # @param [String] parent
494
+ # The parent resource where Cloud SQL should add this server CA.
495
+ # Format: projects/`project`/locations/`location`/instances/`instance`
496
+ # @param [String] fields
497
+ # Selector specifying which fields to include in a partial response.
498
+ # @param [String] quota_user
499
+ # Available to use for quota purposes for server-side applications. Can be any
500
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
501
+ # @param [Google::Apis::RequestOptions] options
502
+ # Request-specific options
503
+ #
504
+ # @yield [result, err] Result & error if block supplied
505
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
506
+ # @yieldparam err [StandardError] error object if request failed
507
+ #
508
+ # @return [Google::Apis::SqlV1beta4::Operation]
509
+ #
510
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
511
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
512
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
513
+ def add_instance_server_ca(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
514
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/addServerCa', options)
515
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
516
+ command.response_class = Google::Apis::SqlV1beta4::Operation
517
+ command.params['project'] = project unless project.nil?
518
+ command.params['instance'] = instance unless instance.nil?
519
+ command.query['parent'] = parent unless parent.nil?
520
+ command.query['fields'] = fields unless fields.nil?
521
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
522
+ execute_or_queue_command(command, &block)
523
+ end
524
+
525
+ # Creates a Cloud SQL instance as a clone of the source instance.
526
+ # @param [String] project
527
+ # Project ID of the source as well as the clone Cloud SQL instance.
528
+ # @param [String] instance
529
+ # The ID of the Cloud SQL instance to be cloned (source). This does not
530
+ # include the project ID.
531
+ # @param [Google::Apis::SqlV1beta4::InstancesCloneRequest] instances_clone_request_object
532
+ # @param [String] parent
533
+ # The parent resource where Cloud SQL should clone this instance.
534
+ # Format: projects/`project`/locations/`location`/instances/`instance`
535
+ # @param [String] fields
536
+ # Selector specifying which fields to include in a partial response.
537
+ # @param [String] quota_user
538
+ # Available to use for quota purposes for server-side applications. Can be any
539
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
540
+ # @param [Google::Apis::RequestOptions] options
541
+ # Request-specific options
542
+ #
543
+ # @yield [result, err] Result & error if block supplied
544
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
545
+ # @yieldparam err [StandardError] error object if request failed
546
+ #
547
+ # @return [Google::Apis::SqlV1beta4::Operation]
548
+ #
549
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
550
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
551
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
552
+ def clone_instance(project, instance, instances_clone_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
553
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/clone', options)
554
+ command.request_representation = Google::Apis::SqlV1beta4::InstancesCloneRequest::Representation
555
+ command.request_object = instances_clone_request_object
556
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
557
+ command.response_class = Google::Apis::SqlV1beta4::Operation
558
+ command.params['project'] = project unless project.nil?
559
+ command.params['instance'] = instance unless instance.nil?
560
+ command.query['parent'] = parent unless parent.nil?
561
+ command.query['fields'] = fields unless fields.nil?
562
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
563
+ execute_or_queue_command(command, &block)
564
+ end
565
+
566
+ # Deletes a Cloud SQL instance.
567
+ # @param [String] project
568
+ # Project ID of the project that contains the instance to be deleted.
569
+ # @param [String] instance
570
+ # Cloud SQL instance ID. This does not include the project ID.
571
+ # @param [String] fields
572
+ # Selector specifying which fields to include in a partial response.
573
+ # @param [String] quota_user
574
+ # Available to use for quota purposes for server-side applications. Can be any
575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
576
+ # @param [Google::Apis::RequestOptions] options
577
+ # Request-specific options
578
+ #
579
+ # @yield [result, err] Result & error if block supplied
580
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
581
+ # @yieldparam err [StandardError] error object if request failed
582
+ #
583
+ # @return [Google::Apis::SqlV1beta4::Operation]
584
+ #
585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
588
+ def delete_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
589
+ command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
590
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
591
+ command.response_class = Google::Apis::SqlV1beta4::Operation
592
+ command.params['project'] = project unless project.nil?
593
+ command.params['instance'] = instance unless instance.nil?
594
+ command.query['fields'] = fields unless fields.nil?
595
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
596
+ execute_or_queue_command(command, &block)
597
+ end
598
+
599
+ # Demotes the stand-alone instance to be a Cloud SQL read replica for an
600
+ # external database server.
601
+ # @param [String] project
602
+ # ID of the project that contains the instance.
603
+ # @param [String] instance
604
+ # Cloud SQL instance name.
605
+ # @param [Google::Apis::SqlV1beta4::InstancesDemoteMasterRequest] instances_demote_master_request_object
606
+ # @param [String] parent
607
+ # The parent resource where Cloud SQL demotes this master database instance.
608
+ # Format: projects/`project`/locations/`location`/instances/`instance`
609
+ # @param [String] fields
610
+ # Selector specifying which fields to include in a partial response.
611
+ # @param [String] quota_user
612
+ # Available to use for quota purposes for server-side applications. Can be any
613
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
614
+ # @param [Google::Apis::RequestOptions] options
615
+ # Request-specific options
616
+ #
617
+ # @yield [result, err] Result & error if block supplied
618
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
619
+ # @yieldparam err [StandardError] error object if request failed
620
+ #
621
+ # @return [Google::Apis::SqlV1beta4::Operation]
622
+ #
623
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
624
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
625
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
626
+ def demote_instance_master(project, instance, instances_demote_master_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
627
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster', options)
628
+ command.request_representation = Google::Apis::SqlV1beta4::InstancesDemoteMasterRequest::Representation
629
+ command.request_object = instances_demote_master_request_object
630
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
631
+ command.response_class = Google::Apis::SqlV1beta4::Operation
632
+ command.params['project'] = project unless project.nil?
633
+ command.params['instance'] = instance unless instance.nil?
634
+ command.query['parent'] = parent unless parent.nil?
635
+ command.query['fields'] = fields unless fields.nil?
636
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
637
+ execute_or_queue_command(command, &block)
638
+ end
639
+
640
+ # Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL
641
+ # dump or CSV file.
642
+ # @param [String] project
643
+ # Project ID of the project that contains the instance to be exported.
644
+ # @param [String] instance
645
+ # Cloud SQL instance ID. This does not include the project ID.
646
+ # @param [Google::Apis::SqlV1beta4::InstancesExportRequest] instances_export_request_object
647
+ # @param [String] parent
648
+ # The parent resource where Cloud SQL exports this database instance.
649
+ # Format: projects/`project`/locations/`location`/instances/`instance`
650
+ # @param [String] fields
651
+ # Selector specifying which fields to include in a partial response.
652
+ # @param [String] quota_user
653
+ # Available to use for quota purposes for server-side applications. Can be any
654
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
655
+ # @param [Google::Apis::RequestOptions] options
656
+ # Request-specific options
657
+ #
658
+ # @yield [result, err] Result & error if block supplied
659
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
660
+ # @yieldparam err [StandardError] error object if request failed
661
+ #
662
+ # @return [Google::Apis::SqlV1beta4::Operation]
663
+ #
664
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
665
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
666
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
667
+ def export_instance(project, instance, instances_export_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
668
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/export', options)
669
+ command.request_representation = Google::Apis::SqlV1beta4::InstancesExportRequest::Representation
670
+ command.request_object = instances_export_request_object
671
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
672
+ command.response_class = Google::Apis::SqlV1beta4::Operation
673
+ command.params['project'] = project unless project.nil?
674
+ command.params['instance'] = instance unless instance.nil?
675
+ command.query['parent'] = parent unless parent.nil?
676
+ command.query['fields'] = fields unless fields.nil?
677
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
678
+ execute_or_queue_command(command, &block)
679
+ end
680
+
681
+ # Failover the instance to its failover replica instance.
682
+ # @param [String] project
683
+ # ID of the project that contains the read replica.
684
+ # @param [String] instance
685
+ # Cloud SQL instance ID. This does not include the project ID.
686
+ # @param [Google::Apis::SqlV1beta4::InstancesFailoverRequest] instances_failover_request_object
687
+ # @param [String] parent
688
+ # The parent resource where Cloud SQL sends this database instance during a
689
+ # failover. Format:
690
+ # projects/`project`/locations/`location`/instances/`instance`
691
+ # @param [String] fields
692
+ # Selector specifying which fields to include in a partial response.
693
+ # @param [String] quota_user
694
+ # Available to use for quota purposes for server-side applications. Can be any
695
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
696
+ # @param [Google::Apis::RequestOptions] options
697
+ # Request-specific options
698
+ #
699
+ # @yield [result, err] Result & error if block supplied
700
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
701
+ # @yieldparam err [StandardError] error object if request failed
702
+ #
703
+ # @return [Google::Apis::SqlV1beta4::Operation]
704
+ #
705
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
706
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
707
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
708
+ def failover_instance(project, instance, instances_failover_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
709
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/failover', options)
710
+ command.request_representation = Google::Apis::SqlV1beta4::InstancesFailoverRequest::Representation
711
+ command.request_object = instances_failover_request_object
712
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
713
+ command.response_class = Google::Apis::SqlV1beta4::Operation
714
+ command.params['project'] = project unless project.nil?
715
+ command.params['instance'] = instance unless instance.nil?
716
+ command.query['parent'] = parent unless parent.nil?
717
+ command.query['fields'] = fields unless fields.nil?
718
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
719
+ execute_or_queue_command(command, &block)
720
+ end
721
+
722
+ # Retrieves a resource containing information about a Cloud SQL instance.
723
+ # @param [String] project
724
+ # Project ID of the project that contains the instance.
725
+ # @param [String] instance
726
+ # Database instance ID. This does not include the project ID.
727
+ # @param [String] resource_name
728
+ # Name of the resource database instance.
729
+ # Format: projects/`project`/locations/`location`/instances/`instance`
730
+ # @param [String] fields
731
+ # Selector specifying which fields to include in a partial response.
732
+ # @param [String] quota_user
733
+ # Available to use for quota purposes for server-side applications. Can be any
734
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
735
+ # @param [Google::Apis::RequestOptions] options
736
+ # Request-specific options
737
+ #
738
+ # @yield [result, err] Result & error if block supplied
739
+ # @yieldparam result [Google::Apis::SqlV1beta4::DatabaseInstance] parsed result object
740
+ # @yieldparam err [StandardError] error object if request failed
741
+ #
742
+ # @return [Google::Apis::SqlV1beta4::DatabaseInstance]
743
+ #
744
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
745
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
746
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
747
+ def get_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
748
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
749
+ command.response_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation
750
+ command.response_class = Google::Apis::SqlV1beta4::DatabaseInstance
751
+ command.params['project'] = project unless project.nil?
752
+ command.params['instance'] = instance unless instance.nil?
753
+ command.query['resourceName'] = resource_name unless resource_name.nil?
754
+ command.query['fields'] = fields unless fields.nil?
755
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
756
+ execute_or_queue_command(command, &block)
757
+ end
758
+
759
+ # Imports data into a Cloud SQL instance from a SQL dump or CSV file in
760
+ # Cloud Storage.
761
+ # @param [String] project
762
+ # Project ID of the project that contains the instance.
763
+ # @param [String] instance
764
+ # Cloud SQL instance ID. This does not include the project ID.
765
+ # @param [Google::Apis::SqlV1beta4::InstancesImportRequest] instances_import_request_object
766
+ # @param [String] parent
767
+ # The parent resource where Cloud SQL imports this database instance.
768
+ # Format: projects/`project`/locations/`location`/instances/`instance`
769
+ # @param [String] fields
770
+ # Selector specifying which fields to include in a partial response.
771
+ # @param [String] quota_user
772
+ # Available to use for quota purposes for server-side applications. Can be any
773
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
774
+ # @param [Google::Apis::RequestOptions] options
775
+ # Request-specific options
776
+ #
777
+ # @yield [result, err] Result & error if block supplied
778
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
779
+ # @yieldparam err [StandardError] error object if request failed
780
+ #
781
+ # @return [Google::Apis::SqlV1beta4::Operation]
782
+ #
783
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
784
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
785
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
786
+ def import_instance(project, instance, instances_import_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
787
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/import', options)
788
+ command.request_representation = Google::Apis::SqlV1beta4::InstancesImportRequest::Representation
789
+ command.request_object = instances_import_request_object
790
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
791
+ command.response_class = Google::Apis::SqlV1beta4::Operation
792
+ command.params['project'] = project unless project.nil?
793
+ command.params['instance'] = instance unless instance.nil?
794
+ command.query['parent'] = parent unless parent.nil?
795
+ command.query['fields'] = fields unless fields.nil?
796
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
797
+ execute_or_queue_command(command, &block)
798
+ end
799
+
800
+ # Creates a new Cloud SQL instance.
801
+ # @param [String] project
802
+ # Project ID of the project to which the newly created Cloud SQL instances
803
+ # should belong.
804
+ # @param [Google::Apis::SqlV1beta4::DatabaseInstance] database_instance_object
805
+ # @param [String] parent
806
+ # The parent resource where Cloud SQL creates this database instance.
807
+ # Format: projects/`project`/locations/`location`
808
+ # @param [String] fields
809
+ # Selector specifying which fields to include in a partial response.
810
+ # @param [String] quota_user
811
+ # Available to use for quota purposes for server-side applications. Can be any
812
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
813
+ # @param [Google::Apis::RequestOptions] options
814
+ # Request-specific options
815
+ #
816
+ # @yield [result, err] Result & error if block supplied
817
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
818
+ # @yieldparam err [StandardError] error object if request failed
819
+ #
820
+ # @return [Google::Apis::SqlV1beta4::Operation]
821
+ #
822
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
823
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
824
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
825
+ def insert_instance(project, database_instance_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
826
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances', options)
827
+ command.request_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation
828
+ command.request_object = database_instance_object
829
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
830
+ command.response_class = Google::Apis::SqlV1beta4::Operation
831
+ command.params['project'] = project unless project.nil?
832
+ command.query['parent'] = parent unless parent.nil?
833
+ command.query['fields'] = fields unless fields.nil?
834
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
835
+ execute_or_queue_command(command, &block)
836
+ end
837
+
838
+ # Lists instances under a given project in the alphabetical order of the
839
+ # instance name.
840
+ # @param [String] project
841
+ # Project ID of the project for which to list Cloud SQL instances.
842
+ # @param [String] filter
843
+ # An expression for filtering the results of the request, such as by name or
844
+ # label.
845
+ # @param [Fixnum] max_results
846
+ # The maximum number of results to return per response.
847
+ # @param [String] page_token
848
+ # A previously-returned page token representing part of the larger set of
849
+ # results to view.
850
+ # @param [String] fields
851
+ # Selector specifying which fields to include in a partial response.
852
+ # @param [String] quota_user
853
+ # Available to use for quota purposes for server-side applications. Can be any
854
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
855
+ # @param [Google::Apis::RequestOptions] options
856
+ # Request-specific options
857
+ #
858
+ # @yield [result, err] Result & error if block supplied
859
+ # @yieldparam result [Google::Apis::SqlV1beta4::InstancesListResponse] parsed result object
860
+ # @yieldparam err [StandardError] error object if request failed
861
+ #
862
+ # @return [Google::Apis::SqlV1beta4::InstancesListResponse]
863
+ #
864
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
865
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
866
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
867
+ def list_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
868
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances', options)
869
+ command.response_representation = Google::Apis::SqlV1beta4::InstancesListResponse::Representation
870
+ command.response_class = Google::Apis::SqlV1beta4::InstancesListResponse
871
+ command.params['project'] = project unless project.nil?
872
+ command.query['filter'] = filter unless filter.nil?
873
+ command.query['maxResults'] = max_results unless max_results.nil?
874
+ command.query['pageToken'] = page_token unless page_token.nil?
875
+ command.query['fields'] = fields unless fields.nil?
876
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
877
+ execute_or_queue_command(command, &block)
878
+ end
879
+
880
+ # Lists all of the trusted Certificate Authorities (CAs) for the specified
881
+ # instance. There can be up to three CAs listed: the CA that was used to sign
882
+ # the certificate that is currently in use, a CA that has been added but not
883
+ # yet used to sign a certificate, and a CA used to sign a certificate that
884
+ # has previously rotated out.
885
+ # @param [String] project
886
+ # Project ID of the project that contains the instance.
887
+ # @param [String] instance
888
+ # Cloud SQL instance ID. This does not include the project ID.
889
+ # @param [String] parent
890
+ # The parent, which owns this collection of server CAs.
891
+ # Format: projects/`project`/locations/`location`/instances/`instance`
892
+ # @param [String] fields
893
+ # Selector specifying which fields to include in a partial response.
894
+ # @param [String] quota_user
895
+ # Available to use for quota purposes for server-side applications. Can be any
896
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
897
+ # @param [Google::Apis::RequestOptions] options
898
+ # Request-specific options
899
+ #
900
+ # @yield [result, err] Result & error if block supplied
901
+ # @yieldparam result [Google::Apis::SqlV1beta4::InstancesListServerCasResponse] parsed result object
902
+ # @yieldparam err [StandardError] error object if request failed
903
+ #
904
+ # @return [Google::Apis::SqlV1beta4::InstancesListServerCasResponse]
905
+ #
906
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
907
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
908
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
909
+ def list_instance_server_cas(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
910
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/listServerCas', options)
911
+ command.response_representation = Google::Apis::SqlV1beta4::InstancesListServerCasResponse::Representation
912
+ command.response_class = Google::Apis::SqlV1beta4::InstancesListServerCasResponse
913
+ command.params['project'] = project unless project.nil?
914
+ command.params['instance'] = instance unless instance.nil?
915
+ command.query['parent'] = parent unless parent.nil?
916
+ command.query['fields'] = fields unless fields.nil?
917
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
918
+ execute_or_queue_command(command, &block)
919
+ end
920
+
921
+ # Updates settings of a Cloud SQL instance.
922
+ # This method supports patch semantics.
923
+ # @param [String] project
924
+ # Project ID of the project that contains the instance.
925
+ # @param [String] instance
926
+ # Cloud SQL instance ID. This does not include the project ID.
927
+ # @param [Google::Apis::SqlV1beta4::DatabaseInstance] database_instance_object
928
+ # @param [String] fields
929
+ # Selector specifying which fields to include in a partial response.
930
+ # @param [String] quota_user
931
+ # Available to use for quota purposes for server-side applications. Can be any
932
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
933
+ # @param [Google::Apis::RequestOptions] options
934
+ # Request-specific options
935
+ #
936
+ # @yield [result, err] Result & error if block supplied
937
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
938
+ # @yieldparam err [StandardError] error object if request failed
939
+ #
940
+ # @return [Google::Apis::SqlV1beta4::Operation]
941
+ #
942
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
943
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
944
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
945
+ def patch_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, options: nil, &block)
946
+ command = make_simple_command(:patch, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
947
+ command.request_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation
948
+ command.request_object = database_instance_object
949
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
950
+ command.response_class = Google::Apis::SqlV1beta4::Operation
951
+ command.params['project'] = project unless project.nil?
952
+ command.params['instance'] = instance unless instance.nil?
953
+ command.query['fields'] = fields unless fields.nil?
954
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
955
+ execute_or_queue_command(command, &block)
956
+ end
957
+
958
+ # Promotes the read replica instance to be a stand-alone Cloud SQL instance.
959
+ # @param [String] project
960
+ # ID of the project that contains the read replica.
961
+ # @param [String] instance
962
+ # Cloud SQL read replica instance name.
963
+ # @param [String] parent
964
+ # The parent resource where Cloud SQL promotes this replica database
965
+ # instance. Format: projects/`project`/locations/`location`
966
+ # @param [String] fields
967
+ # Selector specifying which fields to include in a partial response.
968
+ # @param [String] quota_user
969
+ # Available to use for quota purposes for server-side applications. Can be any
970
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
971
+ # @param [Google::Apis::RequestOptions] options
972
+ # Request-specific options
973
+ #
974
+ # @yield [result, err] Result & error if block supplied
975
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
976
+ # @yieldparam err [StandardError] error object if request failed
977
+ #
978
+ # @return [Google::Apis::SqlV1beta4::Operation]
979
+ #
980
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
981
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
982
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
983
+ def promote_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
984
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', options)
985
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
986
+ command.response_class = Google::Apis::SqlV1beta4::Operation
987
+ command.params['project'] = project unless project.nil?
988
+ command.params['instance'] = instance unless instance.nil?
989
+ command.query['parent'] = parent unless parent.nil?
990
+ command.query['fields'] = fields unless fields.nil?
991
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
992
+ execute_or_queue_command(command, &block)
993
+ end
994
+
995
+ # Deletes all client certificates and generates a new server SSL certificate
996
+ # for the instance.
997
+ # @param [String] project
998
+ # Project ID of the project that contains the instance.
999
+ # @param [String] instance
1000
+ # Cloud SQL instance ID. This does not include the project ID.
1001
+ # @param [String] parent
1002
+ # The parent resource where Cloud SQL resets this SSL config.
1003
+ # Format: projects/`project`/locations/`location`/instances/`instance`
1004
+ # @param [String] fields
1005
+ # Selector specifying which fields to include in a partial response.
1006
+ # @param [String] quota_user
1007
+ # Available to use for quota purposes for server-side applications. Can be any
1008
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1009
+ # @param [Google::Apis::RequestOptions] options
1010
+ # Request-specific options
1011
+ #
1012
+ # @yield [result, err] Result & error if block supplied
1013
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1014
+ # @yieldparam err [StandardError] error object if request failed
1015
+ #
1016
+ # @return [Google::Apis::SqlV1beta4::Operation]
1017
+ #
1018
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1019
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1020
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1021
+ def reset_instance_ssl_config(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1022
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig', options)
1023
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1024
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1025
+ command.params['project'] = project unless project.nil?
1026
+ command.params['instance'] = instance unless instance.nil?
1027
+ command.query['parent'] = parent unless parent.nil?
1028
+ command.query['fields'] = fields unless fields.nil?
1029
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1030
+ execute_or_queue_command(command, &block)
1031
+ end
1032
+
1033
+ # Restarts a Cloud SQL instance.
1034
+ # @param [String] project
1035
+ # Project ID of the project that contains the instance to be restarted.
1036
+ # @param [String] instance
1037
+ # Cloud SQL instance ID. This does not include the project ID.
1038
+ # @param [String] parent
1039
+ # The parent resource where Cloud SQL restarts this database instance.
1040
+ # Format: projects/`project`/locations/`location`/instances/`instance`
1041
+ # @param [String] fields
1042
+ # Selector specifying which fields to include in a partial response.
1043
+ # @param [String] quota_user
1044
+ # Available to use for quota purposes for server-side applications. Can be any
1045
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1046
+ # @param [Google::Apis::RequestOptions] options
1047
+ # Request-specific options
1048
+ #
1049
+ # @yield [result, err] Result & error if block supplied
1050
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1051
+ # @yieldparam err [StandardError] error object if request failed
1052
+ #
1053
+ # @return [Google::Apis::SqlV1beta4::Operation]
1054
+ #
1055
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1056
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1057
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1058
+ def restart_instance(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1059
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restart', options)
1060
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1061
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1062
+ command.params['project'] = project unless project.nil?
1063
+ command.params['instance'] = instance unless instance.nil?
1064
+ command.query['parent'] = parent unless parent.nil?
1065
+ command.query['fields'] = fields unless fields.nil?
1066
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1067
+ execute_or_queue_command(command, &block)
1068
+ end
1069
+
1070
+ # Restores a backup of a Cloud SQL instance.
1071
+ # @param [String] project
1072
+ # Project ID of the project that contains the instance.
1073
+ # @param [String] instance
1074
+ # Cloud SQL instance ID. This does not include the project ID.
1075
+ # @param [Google::Apis::SqlV1beta4::InstancesRestoreBackupRequest] instances_restore_backup_request_object
1076
+ # @param [String] parent
1077
+ # The parent resource where Cloud SQL restores this database instance from
1078
+ # backup. Format:
1079
+ # projects/`project`/locations/`location`/instances/`instance`
1080
+ # @param [String] fields
1081
+ # Selector specifying which fields to include in a partial response.
1082
+ # @param [String] quota_user
1083
+ # Available to use for quota purposes for server-side applications. Can be any
1084
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1085
+ # @param [Google::Apis::RequestOptions] options
1086
+ # Request-specific options
1087
+ #
1088
+ # @yield [result, err] Result & error if block supplied
1089
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1090
+ # @yieldparam err [StandardError] error object if request failed
1091
+ #
1092
+ # @return [Google::Apis::SqlV1beta4::Operation]
1093
+ #
1094
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1095
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1096
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1097
+ def restore_instance_backup(project, instance, instances_restore_backup_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1098
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup', options)
1099
+ command.request_representation = Google::Apis::SqlV1beta4::InstancesRestoreBackupRequest::Representation
1100
+ command.request_object = instances_restore_backup_request_object
1101
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1102
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1103
+ command.params['project'] = project unless project.nil?
1104
+ command.params['instance'] = instance unless instance.nil?
1105
+ command.query['parent'] = parent unless parent.nil?
1106
+ command.query['fields'] = fields unless fields.nil?
1107
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1108
+ execute_or_queue_command(command, &block)
1109
+ end
1110
+
1111
+ # Rotates the server certificate to one signed by the Certificate Authority
1112
+ # (CA) version previously added with the addServerCA method.
1113
+ # @param [String] project
1114
+ # Project ID of the project that contains the instance.
1115
+ # @param [String] instance
1116
+ # Cloud SQL instance ID. This does not include the project ID.
1117
+ # @param [Google::Apis::SqlV1beta4::InstancesRotateServerCaRequest] instances_rotate_server_ca_request_object
1118
+ # @param [String] parent
1119
+ # The parent resource where Cloud SQL rotates these server CAs.
1120
+ # Format: projects/`project`/locations/`location`/instances/`instance`
1121
+ # @param [String] fields
1122
+ # Selector specifying which fields to include in a partial response.
1123
+ # @param [String] quota_user
1124
+ # Available to use for quota purposes for server-side applications. Can be any
1125
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1126
+ # @param [Google::Apis::RequestOptions] options
1127
+ # Request-specific options
1128
+ #
1129
+ # @yield [result, err] Result & error if block supplied
1130
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1131
+ # @yieldparam err [StandardError] error object if request failed
1132
+ #
1133
+ # @return [Google::Apis::SqlV1beta4::Operation]
1134
+ #
1135
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1136
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1137
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1138
+ def rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1139
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa', options)
1140
+ command.request_representation = Google::Apis::SqlV1beta4::InstancesRotateServerCaRequest::Representation
1141
+ command.request_object = instances_rotate_server_ca_request_object
1142
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1143
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1144
+ command.params['project'] = project unless project.nil?
1145
+ command.params['instance'] = instance unless instance.nil?
1146
+ command.query['parent'] = parent unless parent.nil?
1147
+ command.query['fields'] = fields unless fields.nil?
1148
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1149
+ execute_or_queue_command(command, &block)
1150
+ end
1151
+
1152
+ # Starts the replication in the read replica instance.
1153
+ # @param [String] project
1154
+ # ID of the project that contains the read replica.
1155
+ # @param [String] instance
1156
+ # Cloud SQL read replica instance name.
1157
+ # @param [String] parent
1158
+ # The parent resource where Cloud SQL starts this database instance
1159
+ # replication. Format:
1160
+ # projects/`project`/locations/`location`/instances/`instance`
1161
+ # @param [String] fields
1162
+ # Selector specifying which fields to include in a partial response.
1163
+ # @param [String] quota_user
1164
+ # Available to use for quota purposes for server-side applications. Can be any
1165
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1166
+ # @param [Google::Apis::RequestOptions] options
1167
+ # Request-specific options
1168
+ #
1169
+ # @yield [result, err] Result & error if block supplied
1170
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1171
+ # @yieldparam err [StandardError] error object if request failed
1172
+ #
1173
+ # @return [Google::Apis::SqlV1beta4::Operation]
1174
+ #
1175
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1176
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1177
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1178
+ def start_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1179
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/startReplica', options)
1180
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1181
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1182
+ command.params['project'] = project unless project.nil?
1183
+ command.params['instance'] = instance unless instance.nil?
1184
+ command.query['parent'] = parent unless parent.nil?
1185
+ command.query['fields'] = fields unless fields.nil?
1186
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1187
+ execute_or_queue_command(command, &block)
1188
+ end
1189
+
1190
+ # Stops the replication in the read replica instance.
1191
+ # @param [String] project
1192
+ # ID of the project that contains the read replica.
1193
+ # @param [String] instance
1194
+ # Cloud SQL read replica instance name.
1195
+ # @param [String] parent
1196
+ # The parent resource where Cloud SQL stops this database instance
1197
+ # replication. Format:
1198
+ # projects/`project`/locations/`location`/instances/`instance`
1199
+ # @param [String] fields
1200
+ # Selector specifying which fields to include in a partial response.
1201
+ # @param [String] quota_user
1202
+ # Available to use for quota purposes for server-side applications. Can be any
1203
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1204
+ # @param [Google::Apis::RequestOptions] options
1205
+ # Request-specific options
1206
+ #
1207
+ # @yield [result, err] Result & error if block supplied
1208
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1209
+ # @yieldparam err [StandardError] error object if request failed
1210
+ #
1211
+ # @return [Google::Apis::SqlV1beta4::Operation]
1212
+ #
1213
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1214
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1215
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1216
+ def stop_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1217
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/stopReplica', options)
1218
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1219
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1220
+ command.params['project'] = project unless project.nil?
1221
+ command.params['instance'] = instance unless instance.nil?
1222
+ command.query['parent'] = parent unless parent.nil?
1223
+ command.query['fields'] = fields unless fields.nil?
1224
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1225
+ execute_or_queue_command(command, &block)
1226
+ end
1227
+
1228
+ # Truncate MySQL general and slow query log tables
1229
+ # @param [String] project
1230
+ # Project ID of the Cloud SQL project.
1231
+ # @param [String] instance
1232
+ # Cloud SQL instance ID. This does not include the project ID.
1233
+ # @param [Google::Apis::SqlV1beta4::InstancesTruncateLogRequest] instances_truncate_log_request_object
1234
+ # @param [String] parent
1235
+ # The parent resource where Cloud SQL truncates this log.
1236
+ # Format: projects/`project`/locations/`location`/instances/`instance`
1237
+ # @param [String] fields
1238
+ # Selector specifying which fields to include in a partial response.
1239
+ # @param [String] quota_user
1240
+ # Available to use for quota purposes for server-side applications. Can be any
1241
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1242
+ # @param [Google::Apis::RequestOptions] options
1243
+ # Request-specific options
1244
+ #
1245
+ # @yield [result, err] Result & error if block supplied
1246
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1247
+ # @yieldparam err [StandardError] error object if request failed
1248
+ #
1249
+ # @return [Google::Apis::SqlV1beta4::Operation]
1250
+ #
1251
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1252
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1253
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1254
+ def truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1255
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/truncateLog', options)
1256
+ command.request_representation = Google::Apis::SqlV1beta4::InstancesTruncateLogRequest::Representation
1257
+ command.request_object = instances_truncate_log_request_object
1258
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1259
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1260
+ command.params['project'] = project unless project.nil?
1261
+ command.params['instance'] = instance unless instance.nil?
1262
+ command.query['parent'] = parent unless parent.nil?
1263
+ command.query['fields'] = fields unless fields.nil?
1264
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1265
+ execute_or_queue_command(command, &block)
1266
+ end
1267
+
1268
+ # Updates settings of a Cloud SQL instance. <aside
1269
+ # class="caution"><strong>Caution:</strong> This is not a partial update, so
1270
+ # you must include values for all the settings that you want to retain. For
1271
+ # partial updates, use <a
1272
+ # href="/sql/docs/db_path/admin-api/rest/v1beta4/instances/patch">patch</a>.</
1273
+ # aside>
1274
+ # @param [String] project
1275
+ # Project ID of the project that contains the instance.
1276
+ # @param [String] instance
1277
+ # Cloud SQL instance ID. This does not include the project ID.
1278
+ # @param [Google::Apis::SqlV1beta4::DatabaseInstance] database_instance_object
1279
+ # @param [String] fields
1280
+ # Selector specifying which fields to include in a partial response.
1281
+ # @param [String] quota_user
1282
+ # Available to use for quota purposes for server-side applications. Can be any
1283
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1284
+ # @param [Google::Apis::RequestOptions] options
1285
+ # Request-specific options
1286
+ #
1287
+ # @yield [result, err] Result & error if block supplied
1288
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1289
+ # @yieldparam err [StandardError] error object if request failed
1290
+ #
1291
+ # @return [Google::Apis::SqlV1beta4::Operation]
1292
+ #
1293
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1294
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1295
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1296
+ def update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1297
+ command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
1298
+ command.request_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation
1299
+ command.request_object = database_instance_object
1300
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1301
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1302
+ command.params['project'] = project unless project.nil?
1303
+ command.params['instance'] = instance unless instance.nil?
1304
+ command.query['fields'] = fields unless fields.nil?
1305
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1306
+ execute_or_queue_command(command, &block)
1307
+ end
1308
+
1309
+ # Retrieves an instance operation that has been performed on an instance.
1310
+ # @param [String] project
1311
+ # Project ID of the project that contains the instance.
1312
+ # @param [String] operation
1313
+ # Instance operation ID.
1314
+ # @param [String] fields
1315
+ # Selector specifying which fields to include in a partial response.
1316
+ # @param [String] quota_user
1317
+ # Available to use for quota purposes for server-side applications. Can be any
1318
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1319
+ # @param [Google::Apis::RequestOptions] options
1320
+ # Request-specific options
1321
+ #
1322
+ # @yield [result, err] Result & error if block supplied
1323
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1324
+ # @yieldparam err [StandardError] error object if request failed
1325
+ #
1326
+ # @return [Google::Apis::SqlV1beta4::Operation]
1327
+ #
1328
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1329
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1330
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1331
+ def get_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
1332
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations/{operation}', options)
1333
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1334
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1335
+ command.params['project'] = project unless project.nil?
1336
+ command.params['operation'] = operation unless operation.nil?
1337
+ command.query['fields'] = fields unless fields.nil?
1338
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1339
+ execute_or_queue_command(command, &block)
1340
+ end
1341
+
1342
+ # Lists all instance operations that have been performed on the given Cloud
1343
+ # SQL instance in the reverse chronological order of the start time.
1344
+ # @param [String] project
1345
+ # Project ID of the project that contains the instance.
1346
+ # @param [String] instance
1347
+ # Cloud SQL instance ID. This does not include the project ID.
1348
+ # @param [Fixnum] max_results
1349
+ # Maximum number of operations per response.
1350
+ # @param [String] page_token
1351
+ # A previously-returned page token representing part of the larger set of
1352
+ # results to view.
1353
+ # @param [String] parent
1354
+ # Indirect parent. The direct parent should combine with the instance name,
1355
+ # which owns this collection of operations.
1356
+ # Format:
1357
+ # projects/`project`/locations/`location`
1358
+ # @param [String] fields
1359
+ # Selector specifying which fields to include in a partial response.
1360
+ # @param [String] quota_user
1361
+ # Available to use for quota purposes for server-side applications. Can be any
1362
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1363
+ # @param [Google::Apis::RequestOptions] options
1364
+ # Request-specific options
1365
+ #
1366
+ # @yield [result, err] Result & error if block supplied
1367
+ # @yieldparam result [Google::Apis::SqlV1beta4::OperationsListResponse] parsed result object
1368
+ # @yieldparam err [StandardError] error object if request failed
1369
+ #
1370
+ # @return [Google::Apis::SqlV1beta4::OperationsListResponse]
1371
+ #
1372
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1373
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1374
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1375
+ def list_operations(project, instance: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1376
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations', options)
1377
+ command.response_representation = Google::Apis::SqlV1beta4::OperationsListResponse::Representation
1378
+ command.response_class = Google::Apis::SqlV1beta4::OperationsListResponse
1379
+ command.params['project'] = project unless project.nil?
1380
+ command.query['instance'] = instance unless instance.nil?
1381
+ command.query['maxResults'] = max_results unless max_results.nil?
1382
+ command.query['pageToken'] = page_token unless page_token.nil?
1383
+ command.query['parent'] = parent unless parent.nil?
1384
+ command.query['fields'] = fields unless fields.nil?
1385
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1386
+ execute_or_queue_command(command, &block)
1387
+ end
1388
+
1389
+ # Generates a short-lived X509 certificate containing the provided public key
1390
+ # and signed by a private key specific to the target instance. Users may use
1391
+ # the certificate to authenticate as themselves when connecting to the
1392
+ # database.
1393
+ # @param [String] project
1394
+ # Project ID of the Cloud SQL project.
1395
+ # @param [String] instance
1396
+ # Cloud SQL instance ID. This does not include the project ID.
1397
+ # @param [Google::Apis::SqlV1beta4::SslCertsCreateEphemeralRequest] ssl_certs_create_ephemeral_request_object
1398
+ # @param [String] parent
1399
+ # The parent resource where Cloud SQL creates this ephemeral certificate.
1400
+ # Format: projects/`project`/locations/`location`/instances/`instance`
1401
+ # @param [String] fields
1402
+ # Selector specifying which fields to include in a partial response.
1403
+ # @param [String] quota_user
1404
+ # Available to use for quota purposes for server-side applications. Can be any
1405
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1406
+ # @param [Google::Apis::RequestOptions] options
1407
+ # Request-specific options
1408
+ #
1409
+ # @yield [result, err] Result & error if block supplied
1410
+ # @yieldparam result [Google::Apis::SqlV1beta4::SslCert] parsed result object
1411
+ # @yieldparam err [StandardError] error object if request failed
1412
+ #
1413
+ # @return [Google::Apis::SqlV1beta4::SslCert]
1414
+ #
1415
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1416
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1417
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1418
+ def create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1419
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral', options)
1420
+ command.request_representation = Google::Apis::SqlV1beta4::SslCertsCreateEphemeralRequest::Representation
1421
+ command.request_object = ssl_certs_create_ephemeral_request_object
1422
+ command.response_representation = Google::Apis::SqlV1beta4::SslCert::Representation
1423
+ command.response_class = Google::Apis::SqlV1beta4::SslCert
1424
+ command.params['project'] = project unless project.nil?
1425
+ command.params['instance'] = instance unless instance.nil?
1426
+ command.query['parent'] = parent unless parent.nil?
1427
+ command.query['fields'] = fields unless fields.nil?
1428
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1429
+ execute_or_queue_command(command, &block)
1430
+ end
1431
+
1432
+ # Deletes the SSL certificate. For First Generation instances, the
1433
+ # certificate remains valid until the instance is restarted.
1434
+ # @param [String] project
1435
+ # Project ID of the project that contains the instance.
1436
+ # @param [String] instance
1437
+ # Cloud SQL instance ID. This does not include the project ID.
1438
+ # @param [String] sha1_fingerprint
1439
+ # Sha1 FingerPrint.
1440
+ # @param [String] fields
1441
+ # Selector specifying which fields to include in a partial response.
1442
+ # @param [String] quota_user
1443
+ # Available to use for quota purposes for server-side applications. Can be any
1444
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1445
+ # @param [Google::Apis::RequestOptions] options
1446
+ # Request-specific options
1447
+ #
1448
+ # @yield [result, err] Result & error if block supplied
1449
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1450
+ # @yieldparam err [StandardError] error object if request failed
1451
+ #
1452
+ # @return [Google::Apis::SqlV1beta4::Operation]
1453
+ #
1454
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1455
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1456
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1457
+ def delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil, &block)
1458
+ command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
1459
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1460
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1461
+ command.params['project'] = project unless project.nil?
1462
+ command.params['instance'] = instance unless instance.nil?
1463
+ command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil?
1464
+ command.query['fields'] = fields unless fields.nil?
1465
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1466
+ execute_or_queue_command(command, &block)
1467
+ end
1468
+
1469
+ # Retrieves a particular SSL certificate. Does not include the private key
1470
+ # (required for usage). The private key must be saved from the response to
1471
+ # initial creation.
1472
+ # @param [String] project
1473
+ # Project ID of the project that contains the instance.
1474
+ # @param [String] instance
1475
+ # Cloud SQL instance ID. This does not include the project ID.
1476
+ # @param [String] sha1_fingerprint
1477
+ # Sha1 FingerPrint.
1478
+ # @param [String] resource_name
1479
+ # Name of the resource ssl certificate.
1480
+ # Format:
1481
+ # projects/`project`/locations/`location`/instances/`instance`/sslCerts/`sslCert`
1482
+ # @param [String] fields
1483
+ # Selector specifying which fields to include in a partial response.
1484
+ # @param [String] quota_user
1485
+ # Available to use for quota purposes for server-side applications. Can be any
1486
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1487
+ # @param [Google::Apis::RequestOptions] options
1488
+ # Request-specific options
1489
+ #
1490
+ # @yield [result, err] Result & error if block supplied
1491
+ # @yieldparam result [Google::Apis::SqlV1beta4::SslCert] parsed result object
1492
+ # @yieldparam err [StandardError] error object if request failed
1493
+ #
1494
+ # @return [Google::Apis::SqlV1beta4::SslCert]
1495
+ #
1496
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1497
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1498
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1499
+ def get_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
1500
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
1501
+ command.response_representation = Google::Apis::SqlV1beta4::SslCert::Representation
1502
+ command.response_class = Google::Apis::SqlV1beta4::SslCert
1503
+ command.params['project'] = project unless project.nil?
1504
+ command.params['instance'] = instance unless instance.nil?
1505
+ command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil?
1506
+ command.query['resourceName'] = resource_name unless resource_name.nil?
1507
+ command.query['fields'] = fields unless fields.nil?
1508
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1509
+ execute_or_queue_command(command, &block)
1510
+ end
1511
+
1512
+ # Creates an SSL certificate and returns it along with the private key and
1513
+ # server certificate authority. The new certificate will not be usable until
1514
+ # the instance is restarted.
1515
+ # @param [String] project
1516
+ # Project ID of the project that contains the instance.
1517
+ # @param [String] instance
1518
+ # Cloud SQL instance ID. This does not include the project ID.
1519
+ # @param [Google::Apis::SqlV1beta4::SslCertsInsertRequest] ssl_certs_insert_request_object
1520
+ # @param [String] parent
1521
+ # The parent resource where Cloud SQL creates this SSL certificate.
1522
+ # Format: projects/`project`/locations/`location`/instances/`instance`
1523
+ # @param [String] fields
1524
+ # Selector specifying which fields to include in a partial response.
1525
+ # @param [String] quota_user
1526
+ # Available to use for quota purposes for server-side applications. Can be any
1527
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1528
+ # @param [Google::Apis::RequestOptions] options
1529
+ # Request-specific options
1530
+ #
1531
+ # @yield [result, err] Result & error if block supplied
1532
+ # @yieldparam result [Google::Apis::SqlV1beta4::SslCertsInsertResponse] parsed result object
1533
+ # @yieldparam err [StandardError] error object if request failed
1534
+ #
1535
+ # @return [Google::Apis::SqlV1beta4::SslCertsInsertResponse]
1536
+ #
1537
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1538
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1539
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1540
+ def insert_ssl_cert(project, instance, ssl_certs_insert_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1541
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', options)
1542
+ command.request_representation = Google::Apis::SqlV1beta4::SslCertsInsertRequest::Representation
1543
+ command.request_object = ssl_certs_insert_request_object
1544
+ command.response_representation = Google::Apis::SqlV1beta4::SslCertsInsertResponse::Representation
1545
+ command.response_class = Google::Apis::SqlV1beta4::SslCertsInsertResponse
1546
+ command.params['project'] = project unless project.nil?
1547
+ command.params['instance'] = instance unless instance.nil?
1548
+ command.query['parent'] = parent unless parent.nil?
1549
+ command.query['fields'] = fields unless fields.nil?
1550
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1551
+ execute_or_queue_command(command, &block)
1552
+ end
1553
+
1554
+ # Lists all of the current SSL certificates for the instance.
1555
+ # @param [String] project
1556
+ # Project ID of the project that contains the instance.
1557
+ # @param [String] instance
1558
+ # Cloud SQL instance ID. This does not include the project ID.
1559
+ # @param [String] parent
1560
+ # The parent, which owns this collection of SSL certificates.
1561
+ # Format: projects/`project`/locations/`location`/instances/`instance`
1562
+ # @param [String] fields
1563
+ # Selector specifying which fields to include in a partial response.
1564
+ # @param [String] quota_user
1565
+ # Available to use for quota purposes for server-side applications. Can be any
1566
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1567
+ # @param [Google::Apis::RequestOptions] options
1568
+ # Request-specific options
1569
+ #
1570
+ # @yield [result, err] Result & error if block supplied
1571
+ # @yieldparam result [Google::Apis::SqlV1beta4::SslCertsListResponse] parsed result object
1572
+ # @yieldparam err [StandardError] error object if request failed
1573
+ #
1574
+ # @return [Google::Apis::SqlV1beta4::SslCertsListResponse]
1575
+ #
1576
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1577
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1578
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1579
+ def list_ssl_certs(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1580
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', options)
1581
+ command.response_representation = Google::Apis::SqlV1beta4::SslCertsListResponse::Representation
1582
+ command.response_class = Google::Apis::SqlV1beta4::SslCertsListResponse
1583
+ command.params['project'] = project unless project.nil?
1584
+ command.params['instance'] = instance unless instance.nil?
1585
+ command.query['parent'] = parent unless parent.nil?
1586
+ command.query['fields'] = fields unless fields.nil?
1587
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1588
+ execute_or_queue_command(command, &block)
1589
+ end
1590
+
1591
+ # Lists all available machine types (tiers) for Cloud SQL, for example,
1592
+ # db-n1-standard-1. For related information, see <a
1593
+ # href="/sql/pricing">Pricing</a>.
1594
+ # @param [String] project
1595
+ # Project ID of the project for which to list tiers.
1596
+ # @param [String] fields
1597
+ # Selector specifying which fields to include in a partial response.
1598
+ # @param [String] quota_user
1599
+ # Available to use for quota purposes for server-side applications. Can be any
1600
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1601
+ # @param [Google::Apis::RequestOptions] options
1602
+ # Request-specific options
1603
+ #
1604
+ # @yield [result, err] Result & error if block supplied
1605
+ # @yieldparam result [Google::Apis::SqlV1beta4::TiersListResponse] parsed result object
1606
+ # @yieldparam err [StandardError] error object if request failed
1607
+ #
1608
+ # @return [Google::Apis::SqlV1beta4::TiersListResponse]
1609
+ #
1610
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1611
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1612
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1613
+ def list_tiers(project, fields: nil, quota_user: nil, options: nil, &block)
1614
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/tiers', options)
1615
+ command.response_representation = Google::Apis::SqlV1beta4::TiersListResponse::Representation
1616
+ command.response_class = Google::Apis::SqlV1beta4::TiersListResponse
1617
+ command.params['project'] = project unless project.nil?
1618
+ command.query['fields'] = fields unless fields.nil?
1619
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1620
+ execute_or_queue_command(command, &block)
1621
+ end
1622
+
1623
+ # Deletes a user from a Cloud SQL instance.
1624
+ # @param [String] project
1625
+ # Project ID of the project that contains the instance.
1626
+ # @param [String] instance
1627
+ # Database instance ID. This does not include the project ID.
1628
+ # @param [String] host
1629
+ # Host of the user in the instance.
1630
+ # @param [String] name
1631
+ # Name of the user in the instance.
1632
+ # @param [String] fields
1633
+ # Selector specifying which fields to include in a partial response.
1634
+ # @param [String] quota_user
1635
+ # Available to use for quota purposes for server-side applications. Can be any
1636
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1637
+ # @param [Google::Apis::RequestOptions] options
1638
+ # Request-specific options
1639
+ #
1640
+ # @yield [result, err] Result & error if block supplied
1641
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1642
+ # @yieldparam err [StandardError] error object if request failed
1643
+ #
1644
+ # @return [Google::Apis::SqlV1beta4::Operation]
1645
+ #
1646
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1647
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1648
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1649
+ def delete_user(project, instance, host: nil, name: nil, fields: nil, quota_user: nil, options: nil, &block)
1650
+ command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
1651
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1652
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1653
+ command.params['project'] = project unless project.nil?
1654
+ command.params['instance'] = instance unless instance.nil?
1655
+ command.query['host'] = host unless host.nil?
1656
+ command.query['name'] = name unless name.nil?
1657
+ command.query['fields'] = fields unless fields.nil?
1658
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1659
+ execute_or_queue_command(command, &block)
1660
+ end
1661
+
1662
+ # Creates a new user in a Cloud SQL instance.
1663
+ # @param [String] project
1664
+ # Project ID of the project that contains the instance.
1665
+ # @param [String] instance
1666
+ # Database instance ID. This does not include the project ID.
1667
+ # @param [Google::Apis::SqlV1beta4::User] user_object
1668
+ # @param [String] parent
1669
+ # The parent resource where Cloud SQL creates this user.
1670
+ # Format: projects/`project`/locations/`location`/instances/`instance`
1671
+ # @param [String] fields
1672
+ # Selector specifying which fields to include in a partial response.
1673
+ # @param [String] quota_user
1674
+ # Available to use for quota purposes for server-side applications. Can be any
1675
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1676
+ # @param [Google::Apis::RequestOptions] options
1677
+ # Request-specific options
1678
+ #
1679
+ # @yield [result, err] Result & error if block supplied
1680
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1681
+ # @yieldparam err [StandardError] error object if request failed
1682
+ #
1683
+ # @return [Google::Apis::SqlV1beta4::Operation]
1684
+ #
1685
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1686
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1687
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1688
+ def insert_user(project, instance, user_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1689
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
1690
+ command.request_representation = Google::Apis::SqlV1beta4::User::Representation
1691
+ command.request_object = user_object
1692
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1693
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1694
+ command.params['project'] = project unless project.nil?
1695
+ command.params['instance'] = instance unless instance.nil?
1696
+ command.query['parent'] = parent unless parent.nil?
1697
+ command.query['fields'] = fields unless fields.nil?
1698
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1699
+ execute_or_queue_command(command, &block)
1700
+ end
1701
+
1702
+ # Lists users in the specified Cloud SQL instance.
1703
+ # @param [String] project
1704
+ # Project ID of the project that contains the instance.
1705
+ # @param [String] instance
1706
+ # Database instance ID. This does not include the project ID.
1707
+ # @param [String] parent
1708
+ # The parent, which owns this collection of users.
1709
+ # Format: projects/`project`/locations/`location`/instances/`instance`
1710
+ # @param [String] fields
1711
+ # Selector specifying which fields to include in a partial response.
1712
+ # @param [String] quota_user
1713
+ # Available to use for quota purposes for server-side applications. Can be any
1714
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1715
+ # @param [Google::Apis::RequestOptions] options
1716
+ # Request-specific options
1717
+ #
1718
+ # @yield [result, err] Result & error if block supplied
1719
+ # @yieldparam result [Google::Apis::SqlV1beta4::UsersListResponse] parsed result object
1720
+ # @yieldparam err [StandardError] error object if request failed
1721
+ #
1722
+ # @return [Google::Apis::SqlV1beta4::UsersListResponse]
1723
+ #
1724
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1725
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1726
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1727
+ def list_users(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1728
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
1729
+ command.response_representation = Google::Apis::SqlV1beta4::UsersListResponse::Representation
1730
+ command.response_class = Google::Apis::SqlV1beta4::UsersListResponse
1731
+ command.params['project'] = project unless project.nil?
1732
+ command.params['instance'] = instance unless instance.nil?
1733
+ command.query['parent'] = parent unless parent.nil?
1734
+ command.query['fields'] = fields unless fields.nil?
1735
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1736
+ execute_or_queue_command(command, &block)
1737
+ end
1738
+
1739
+ # Updates an existing user in a Cloud SQL instance.
1740
+ # @param [String] project
1741
+ # Project ID of the project that contains the instance.
1742
+ # @param [String] instance
1743
+ # Database instance ID. This does not include the project ID.
1744
+ # @param [Google::Apis::SqlV1beta4::User] user_object
1745
+ # @param [String] host
1746
+ # Host of the user in the instance. For a MySQL instance, it's required; For
1747
+ # a PostgreSQL instance, it's optional.
1748
+ # @param [String] name
1749
+ # Name of the user in the instance.
1750
+ # @param [String] fields
1751
+ # Selector specifying which fields to include in a partial response.
1752
+ # @param [String] quota_user
1753
+ # Available to use for quota purposes for server-side applications. Can be any
1754
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1755
+ # @param [Google::Apis::RequestOptions] options
1756
+ # Request-specific options
1757
+ #
1758
+ # @yield [result, err] Result & error if block supplied
1759
+ # @yieldparam result [Google::Apis::SqlV1beta4::Operation] parsed result object
1760
+ # @yieldparam err [StandardError] error object if request failed
1761
+ #
1762
+ # @return [Google::Apis::SqlV1beta4::Operation]
1763
+ #
1764
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1765
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1766
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1767
+ def update_user(project, instance, user_object = nil, host: nil, name: nil, fields: nil, quota_user: nil, options: nil, &block)
1768
+ command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
1769
+ command.request_representation = Google::Apis::SqlV1beta4::User::Representation
1770
+ command.request_object = user_object
1771
+ command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
1772
+ command.response_class = Google::Apis::SqlV1beta4::Operation
1773
+ command.params['project'] = project unless project.nil?
1774
+ command.params['instance'] = instance unless instance.nil?
1775
+ command.query['host'] = host unless host.nil?
1776
+ command.query['name'] = name unless name.nil?
1777
+ command.query['fields'] = fields unless fields.nil?
1778
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1779
+ execute_or_queue_command(command, &block)
1780
+ end
1781
+
1782
+ protected
1783
+
1784
+ def apply_command_defaults(command)
1785
+ command.query['key'] = key unless key.nil?
1786
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1787
+ end
1788
+ end
1789
+ end
1790
+ end
1791
+ end