SQLAdmin.php 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for SQLAdmin (v1).
  21. *
  22. * <p>
  23. * API for Cloud SQL database instance management</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/sql/docs" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class SQLAdmin extends \Google\Service
  33. {
  34. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  35. const CLOUD_PLATFORM =
  36. "https://www.googleapis.com/auth/cloud-platform";
  37. /** Manage your Google SQL Service instances. */
  38. const SQLSERVICE_ADMIN =
  39. "https://www.googleapis.com/auth/sqlservice.admin";
  40. public $Backups;
  41. public $backupRuns;
  42. public $connect;
  43. public $databases;
  44. public $flags;
  45. public $instances;
  46. public $operations;
  47. public $projects_instances;
  48. public $sslCerts;
  49. public $tiers;
  50. public $users;
  51. public $rootUrlTemplate;
  52. /**
  53. * Constructs the internal representation of the SQLAdmin service.
  54. *
  55. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  56. * config array to pass to a new Client instance.
  57. * @param string $rootUrl The root URL used for requests to the service.
  58. */
  59. public function __construct($clientOrConfig = [], $rootUrl = null)
  60. {
  61. parent::__construct($clientOrConfig);
  62. $this->rootUrl = $rootUrl ?: 'https://sqladmin.googleapis.com/';
  63. $this->rootUrlTemplate = $rootUrl ?: 'https://sqladmin.UNIVERSE_DOMAIN/';
  64. $this->servicePath = '';
  65. $this->batchPath = 'batch';
  66. $this->version = 'v1';
  67. $this->serviceName = 'sqladmin';
  68. $this->Backups = new SQLAdmin\Resource\Backups(
  69. $this,
  70. $this->serviceName,
  71. 'Backups',
  72. [
  73. 'methods' => [
  74. 'CreateBackup' => [
  75. 'path' => 'v1/{+parent}/backups',
  76. 'httpMethod' => 'POST',
  77. 'parameters' => [
  78. 'parent' => [
  79. 'location' => 'path',
  80. 'type' => 'string',
  81. 'required' => true,
  82. ],
  83. ],
  84. ],'DeleteBackup' => [
  85. 'path' => 'v1/{+name}',
  86. 'httpMethod' => 'DELETE',
  87. 'parameters' => [
  88. 'name' => [
  89. 'location' => 'path',
  90. 'type' => 'string',
  91. 'required' => true,
  92. ],
  93. ],
  94. ],'GetBackup' => [
  95. 'path' => 'v1/{+name}',
  96. 'httpMethod' => 'GET',
  97. 'parameters' => [
  98. 'name' => [
  99. 'location' => 'path',
  100. 'type' => 'string',
  101. 'required' => true,
  102. ],
  103. ],
  104. ],'ListBackups' => [
  105. 'path' => 'v1/{+parent}/backups',
  106. 'httpMethod' => 'GET',
  107. 'parameters' => [
  108. 'parent' => [
  109. 'location' => 'path',
  110. 'type' => 'string',
  111. 'required' => true,
  112. ],
  113. 'filter' => [
  114. 'location' => 'query',
  115. 'type' => 'string',
  116. ],
  117. 'pageSize' => [
  118. 'location' => 'query',
  119. 'type' => 'integer',
  120. ],
  121. 'pageToken' => [
  122. 'location' => 'query',
  123. 'type' => 'string',
  124. ],
  125. ],
  126. ],'UpdateBackup' => [
  127. 'path' => 'v1/{+name}',
  128. 'httpMethod' => 'PATCH',
  129. 'parameters' => [
  130. 'name' => [
  131. 'location' => 'path',
  132. 'type' => 'string',
  133. 'required' => true,
  134. ],
  135. 'updateMask' => [
  136. 'location' => 'query',
  137. 'type' => 'string',
  138. ],
  139. ],
  140. ],
  141. ]
  142. ]
  143. );
  144. $this->backupRuns = new SQLAdmin\Resource\BackupRuns(
  145. $this,
  146. $this->serviceName,
  147. 'backupRuns',
  148. [
  149. 'methods' => [
  150. 'delete' => [
  151. 'path' => 'v1/projects/{project}/instances/{instance}/backupRuns/{id}',
  152. 'httpMethod' => 'DELETE',
  153. 'parameters' => [
  154. 'project' => [
  155. 'location' => 'path',
  156. 'type' => 'string',
  157. 'required' => true,
  158. ],
  159. 'instance' => [
  160. 'location' => 'path',
  161. 'type' => 'string',
  162. 'required' => true,
  163. ],
  164. 'id' => [
  165. 'location' => 'path',
  166. 'type' => 'string',
  167. 'required' => true,
  168. ],
  169. ],
  170. ],'get' => [
  171. 'path' => 'v1/projects/{project}/instances/{instance}/backupRuns/{id}',
  172. 'httpMethod' => 'GET',
  173. 'parameters' => [
  174. 'project' => [
  175. 'location' => 'path',
  176. 'type' => 'string',
  177. 'required' => true,
  178. ],
  179. 'instance' => [
  180. 'location' => 'path',
  181. 'type' => 'string',
  182. 'required' => true,
  183. ],
  184. 'id' => [
  185. 'location' => 'path',
  186. 'type' => 'string',
  187. 'required' => true,
  188. ],
  189. ],
  190. ],'insert' => [
  191. 'path' => 'v1/projects/{project}/instances/{instance}/backupRuns',
  192. 'httpMethod' => 'POST',
  193. 'parameters' => [
  194. 'project' => [
  195. 'location' => 'path',
  196. 'type' => 'string',
  197. 'required' => true,
  198. ],
  199. 'instance' => [
  200. 'location' => 'path',
  201. 'type' => 'string',
  202. 'required' => true,
  203. ],
  204. ],
  205. ],'list' => [
  206. 'path' => 'v1/projects/{project}/instances/{instance}/backupRuns',
  207. 'httpMethod' => 'GET',
  208. 'parameters' => [
  209. 'project' => [
  210. 'location' => 'path',
  211. 'type' => 'string',
  212. 'required' => true,
  213. ],
  214. 'instance' => [
  215. 'location' => 'path',
  216. 'type' => 'string',
  217. 'required' => true,
  218. ],
  219. 'maxResults' => [
  220. 'location' => 'query',
  221. 'type' => 'integer',
  222. ],
  223. 'pageToken' => [
  224. 'location' => 'query',
  225. 'type' => 'string',
  226. ],
  227. ],
  228. ],
  229. ]
  230. ]
  231. );
  232. $this->connect = new SQLAdmin\Resource\Connect(
  233. $this,
  234. $this->serviceName,
  235. 'connect',
  236. [
  237. 'methods' => [
  238. 'generateEphemeralCert' => [
  239. 'path' => 'v1/projects/{project}/instances/{instance}:generateEphemeralCert',
  240. 'httpMethod' => 'POST',
  241. 'parameters' => [
  242. 'project' => [
  243. 'location' => 'path',
  244. 'type' => 'string',
  245. 'required' => true,
  246. ],
  247. 'instance' => [
  248. 'location' => 'path',
  249. 'type' => 'string',
  250. 'required' => true,
  251. ],
  252. ],
  253. ],'get' => [
  254. 'path' => 'v1/projects/{project}/instances/{instance}/connectSettings',
  255. 'httpMethod' => 'GET',
  256. 'parameters' => [
  257. 'project' => [
  258. 'location' => 'path',
  259. 'type' => 'string',
  260. 'required' => true,
  261. ],
  262. 'instance' => [
  263. 'location' => 'path',
  264. 'type' => 'string',
  265. 'required' => true,
  266. ],
  267. 'readTime' => [
  268. 'location' => 'query',
  269. 'type' => 'string',
  270. ],
  271. ],
  272. ],
  273. ]
  274. ]
  275. );
  276. $this->databases = new SQLAdmin\Resource\Databases(
  277. $this,
  278. $this->serviceName,
  279. 'databases',
  280. [
  281. 'methods' => [
  282. 'delete' => [
  283. 'path' => 'v1/projects/{project}/instances/{instance}/databases/{database}',
  284. 'httpMethod' => 'DELETE',
  285. 'parameters' => [
  286. 'project' => [
  287. 'location' => 'path',
  288. 'type' => 'string',
  289. 'required' => true,
  290. ],
  291. 'instance' => [
  292. 'location' => 'path',
  293. 'type' => 'string',
  294. 'required' => true,
  295. ],
  296. 'database' => [
  297. 'location' => 'path',
  298. 'type' => 'string',
  299. 'required' => true,
  300. ],
  301. ],
  302. ],'get' => [
  303. 'path' => 'v1/projects/{project}/instances/{instance}/databases/{database}',
  304. 'httpMethod' => 'GET',
  305. 'parameters' => [
  306. 'project' => [
  307. 'location' => 'path',
  308. 'type' => 'string',
  309. 'required' => true,
  310. ],
  311. 'instance' => [
  312. 'location' => 'path',
  313. 'type' => 'string',
  314. 'required' => true,
  315. ],
  316. 'database' => [
  317. 'location' => 'path',
  318. 'type' => 'string',
  319. 'required' => true,
  320. ],
  321. ],
  322. ],'insert' => [
  323. 'path' => 'v1/projects/{project}/instances/{instance}/databases',
  324. 'httpMethod' => 'POST',
  325. 'parameters' => [
  326. 'project' => [
  327. 'location' => 'path',
  328. 'type' => 'string',
  329. 'required' => true,
  330. ],
  331. 'instance' => [
  332. 'location' => 'path',
  333. 'type' => 'string',
  334. 'required' => true,
  335. ],
  336. ],
  337. ],'list' => [
  338. 'path' => 'v1/projects/{project}/instances/{instance}/databases',
  339. 'httpMethod' => 'GET',
  340. 'parameters' => [
  341. 'project' => [
  342. 'location' => 'path',
  343. 'type' => 'string',
  344. 'required' => true,
  345. ],
  346. 'instance' => [
  347. 'location' => 'path',
  348. 'type' => 'string',
  349. 'required' => true,
  350. ],
  351. ],
  352. ],'patch' => [
  353. 'path' => 'v1/projects/{project}/instances/{instance}/databases/{database}',
  354. 'httpMethod' => 'PATCH',
  355. 'parameters' => [
  356. 'project' => [
  357. 'location' => 'path',
  358. 'type' => 'string',
  359. 'required' => true,
  360. ],
  361. 'instance' => [
  362. 'location' => 'path',
  363. 'type' => 'string',
  364. 'required' => true,
  365. ],
  366. 'database' => [
  367. 'location' => 'path',
  368. 'type' => 'string',
  369. 'required' => true,
  370. ],
  371. ],
  372. ],'update' => [
  373. 'path' => 'v1/projects/{project}/instances/{instance}/databases/{database}',
  374. 'httpMethod' => 'PUT',
  375. 'parameters' => [
  376. 'project' => [
  377. 'location' => 'path',
  378. 'type' => 'string',
  379. 'required' => true,
  380. ],
  381. 'instance' => [
  382. 'location' => 'path',
  383. 'type' => 'string',
  384. 'required' => true,
  385. ],
  386. 'database' => [
  387. 'location' => 'path',
  388. 'type' => 'string',
  389. 'required' => true,
  390. ],
  391. ],
  392. ],
  393. ]
  394. ]
  395. );
  396. $this->flags = new SQLAdmin\Resource\Flags(
  397. $this,
  398. $this->serviceName,
  399. 'flags',
  400. [
  401. 'methods' => [
  402. 'list' => [
  403. 'path' => 'v1/flags',
  404. 'httpMethod' => 'GET',
  405. 'parameters' => [
  406. 'databaseVersion' => [
  407. 'location' => 'query',
  408. 'type' => 'string',
  409. ],
  410. 'flagScope' => [
  411. 'location' => 'query',
  412. 'type' => 'string',
  413. ],
  414. ],
  415. ],
  416. ]
  417. ]
  418. );
  419. $this->instances = new SQLAdmin\Resource\Instances(
  420. $this,
  421. $this->serviceName,
  422. 'instances',
  423. [
  424. 'methods' => [
  425. 'ListEntraIdCertificates' => [
  426. 'path' => 'v1/projects/{project}/instances/{instance}/listEntraIdCertificates',
  427. 'httpMethod' => 'GET',
  428. 'parameters' => [
  429. 'project' => [
  430. 'location' => 'path',
  431. 'type' => 'string',
  432. 'required' => true,
  433. ],
  434. 'instance' => [
  435. 'location' => 'path',
  436. 'type' => 'string',
  437. 'required' => true,
  438. ],
  439. ],
  440. ],'ListServerCertificates' => [
  441. 'path' => 'v1/projects/{project}/instances/{instance}/listServerCertificates',
  442. 'httpMethod' => 'GET',
  443. 'parameters' => [
  444. 'project' => [
  445. 'location' => 'path',
  446. 'type' => 'string',
  447. 'required' => true,
  448. ],
  449. 'instance' => [
  450. 'location' => 'path',
  451. 'type' => 'string',
  452. 'required' => true,
  453. ],
  454. ],
  455. ],'RotateEntraIdCertificate' => [
  456. 'path' => 'v1/projects/{project}/instances/{instance}/rotateEntraIdCertificate',
  457. 'httpMethod' => 'POST',
  458. 'parameters' => [
  459. 'project' => [
  460. 'location' => 'path',
  461. 'type' => 'string',
  462. 'required' => true,
  463. ],
  464. 'instance' => [
  465. 'location' => 'path',
  466. 'type' => 'string',
  467. 'required' => true,
  468. ],
  469. ],
  470. ],'RotateServerCertificate' => [
  471. 'path' => 'v1/projects/{project}/instances/{instance}/rotateServerCertificate',
  472. 'httpMethod' => 'POST',
  473. 'parameters' => [
  474. 'project' => [
  475. 'location' => 'path',
  476. 'type' => 'string',
  477. 'required' => true,
  478. ],
  479. 'instance' => [
  480. 'location' => 'path',
  481. 'type' => 'string',
  482. 'required' => true,
  483. ],
  484. ],
  485. ],'acquireSsrsLease' => [
  486. 'path' => 'v1/projects/{project}/instances/{instance}/acquireSsrsLease',
  487. 'httpMethod' => 'POST',
  488. 'parameters' => [
  489. 'project' => [
  490. 'location' => 'path',
  491. 'type' => 'string',
  492. 'required' => true,
  493. ],
  494. 'instance' => [
  495. 'location' => 'path',
  496. 'type' => 'string',
  497. 'required' => true,
  498. ],
  499. ],
  500. ],'addEntraIdCertificate' => [
  501. 'path' => 'v1/projects/{project}/instances/{instance}/addEntraIdCertificate',
  502. 'httpMethod' => 'POST',
  503. 'parameters' => [
  504. 'project' => [
  505. 'location' => 'path',
  506. 'type' => 'string',
  507. 'required' => true,
  508. ],
  509. 'instance' => [
  510. 'location' => 'path',
  511. 'type' => 'string',
  512. 'required' => true,
  513. ],
  514. ],
  515. ],'addServerCa' => [
  516. 'path' => 'v1/projects/{project}/instances/{instance}/addServerCa',
  517. 'httpMethod' => 'POST',
  518. 'parameters' => [
  519. 'project' => [
  520. 'location' => 'path',
  521. 'type' => 'string',
  522. 'required' => true,
  523. ],
  524. 'instance' => [
  525. 'location' => 'path',
  526. 'type' => 'string',
  527. 'required' => true,
  528. ],
  529. ],
  530. ],'addServerCertificate' => [
  531. 'path' => 'v1/projects/{project}/instances/{instance}/addServerCertificate',
  532. 'httpMethod' => 'POST',
  533. 'parameters' => [
  534. 'project' => [
  535. 'location' => 'path',
  536. 'type' => 'string',
  537. 'required' => true,
  538. ],
  539. 'instance' => [
  540. 'location' => 'path',
  541. 'type' => 'string',
  542. 'required' => true,
  543. ],
  544. ],
  545. ],'clone' => [
  546. 'path' => 'v1/projects/{project}/instances/{instance}/clone',
  547. 'httpMethod' => 'POST',
  548. 'parameters' => [
  549. 'project' => [
  550. 'location' => 'path',
  551. 'type' => 'string',
  552. 'required' => true,
  553. ],
  554. 'instance' => [
  555. 'location' => 'path',
  556. 'type' => 'string',
  557. 'required' => true,
  558. ],
  559. ],
  560. ],'delete' => [
  561. 'path' => 'v1/projects/{project}/instances/{instance}',
  562. 'httpMethod' => 'DELETE',
  563. 'parameters' => [
  564. 'project' => [
  565. 'location' => 'path',
  566. 'type' => 'string',
  567. 'required' => true,
  568. ],
  569. 'instance' => [
  570. 'location' => 'path',
  571. 'type' => 'string',
  572. 'required' => true,
  573. ],
  574. 'enableFinalBackup' => [
  575. 'location' => 'query',
  576. 'type' => 'boolean',
  577. ],
  578. 'finalBackupDescription' => [
  579. 'location' => 'query',
  580. 'type' => 'string',
  581. ],
  582. 'finalBackupExpiryTime' => [
  583. 'location' => 'query',
  584. 'type' => 'string',
  585. ],
  586. 'finalBackupTtlDays' => [
  587. 'location' => 'query',
  588. 'type' => 'string',
  589. ],
  590. ],
  591. ],'demote' => [
  592. 'path' => 'v1/projects/{project}/instances/{instance}/demote',
  593. 'httpMethod' => 'POST',
  594. 'parameters' => [
  595. 'project' => [
  596. 'location' => 'path',
  597. 'type' => 'string',
  598. 'required' => true,
  599. ],
  600. 'instance' => [
  601. 'location' => 'path',
  602. 'type' => 'string',
  603. 'required' => true,
  604. ],
  605. ],
  606. ],'demoteMaster' => [
  607. 'path' => 'v1/projects/{project}/instances/{instance}/demoteMaster',
  608. 'httpMethod' => 'POST',
  609. 'parameters' => [
  610. 'project' => [
  611. 'location' => 'path',
  612. 'type' => 'string',
  613. 'required' => true,
  614. ],
  615. 'instance' => [
  616. 'location' => 'path',
  617. 'type' => 'string',
  618. 'required' => true,
  619. ],
  620. ],
  621. ],'executeSql' => [
  622. 'path' => 'v1/projects/{project}/instances/{instance}/executeSql',
  623. 'httpMethod' => 'POST',
  624. 'parameters' => [
  625. 'project' => [
  626. 'location' => 'path',
  627. 'type' => 'string',
  628. 'required' => true,
  629. ],
  630. 'instance' => [
  631. 'location' => 'path',
  632. 'type' => 'string',
  633. 'required' => true,
  634. ],
  635. ],
  636. ],'export' => [
  637. 'path' => 'v1/projects/{project}/instances/{instance}/export',
  638. 'httpMethod' => 'POST',
  639. 'parameters' => [
  640. 'project' => [
  641. 'location' => 'path',
  642. 'type' => 'string',
  643. 'required' => true,
  644. ],
  645. 'instance' => [
  646. 'location' => 'path',
  647. 'type' => 'string',
  648. 'required' => true,
  649. ],
  650. ],
  651. ],'failover' => [
  652. 'path' => 'v1/projects/{project}/instances/{instance}/failover',
  653. 'httpMethod' => 'POST',
  654. 'parameters' => [
  655. 'project' => [
  656. 'location' => 'path',
  657. 'type' => 'string',
  658. 'required' => true,
  659. ],
  660. 'instance' => [
  661. 'location' => 'path',
  662. 'type' => 'string',
  663. 'required' => true,
  664. ],
  665. ],
  666. ],'get' => [
  667. 'path' => 'v1/projects/{project}/instances/{instance}',
  668. 'httpMethod' => 'GET',
  669. 'parameters' => [
  670. 'project' => [
  671. 'location' => 'path',
  672. 'type' => 'string',
  673. 'required' => true,
  674. ],
  675. 'instance' => [
  676. 'location' => 'path',
  677. 'type' => 'string',
  678. 'required' => true,
  679. ],
  680. ],
  681. ],'import' => [
  682. 'path' => 'v1/projects/{project}/instances/{instance}/import',
  683. 'httpMethod' => 'POST',
  684. 'parameters' => [
  685. 'project' => [
  686. 'location' => 'path',
  687. 'type' => 'string',
  688. 'required' => true,
  689. ],
  690. 'instance' => [
  691. 'location' => 'path',
  692. 'type' => 'string',
  693. 'required' => true,
  694. ],
  695. ],
  696. ],'insert' => [
  697. 'path' => 'v1/projects/{project}/instances',
  698. 'httpMethod' => 'POST',
  699. 'parameters' => [
  700. 'project' => [
  701. 'location' => 'path',
  702. 'type' => 'string',
  703. 'required' => true,
  704. ],
  705. ],
  706. ],'list' => [
  707. 'path' => 'v1/projects/{project}/instances',
  708. 'httpMethod' => 'GET',
  709. 'parameters' => [
  710. 'project' => [
  711. 'location' => 'path',
  712. 'type' => 'string',
  713. 'required' => true,
  714. ],
  715. 'filter' => [
  716. 'location' => 'query',
  717. 'type' => 'string',
  718. ],
  719. 'maxResults' => [
  720. 'location' => 'query',
  721. 'type' => 'integer',
  722. ],
  723. 'pageToken' => [
  724. 'location' => 'query',
  725. 'type' => 'string',
  726. ],
  727. ],
  728. ],'listServerCas' => [
  729. 'path' => 'v1/projects/{project}/instances/{instance}/listServerCas',
  730. 'httpMethod' => 'GET',
  731. 'parameters' => [
  732. 'project' => [
  733. 'location' => 'path',
  734. 'type' => 'string',
  735. 'required' => true,
  736. ],
  737. 'instance' => [
  738. 'location' => 'path',
  739. 'type' => 'string',
  740. 'required' => true,
  741. ],
  742. ],
  743. ],'patch' => [
  744. 'path' => 'v1/projects/{project}/instances/{instance}',
  745. 'httpMethod' => 'PATCH',
  746. 'parameters' => [
  747. 'project' => [
  748. 'location' => 'path',
  749. 'type' => 'string',
  750. 'required' => true,
  751. ],
  752. 'instance' => [
  753. 'location' => 'path',
  754. 'type' => 'string',
  755. 'required' => true,
  756. ],
  757. ],
  758. ],'pointInTimeRestore' => [
  759. 'path' => 'v1/{+parent}:pointInTimeRestore',
  760. 'httpMethod' => 'POST',
  761. 'parameters' => [
  762. 'parent' => [
  763. 'location' => 'path',
  764. 'type' => 'string',
  765. 'required' => true,
  766. ],
  767. ],
  768. ],'preCheckMajorVersionUpgrade' => [
  769. 'path' => 'v1/projects/{project}/instances/{instance}/preCheckMajorVersionUpgrade',
  770. 'httpMethod' => 'POST',
  771. 'parameters' => [
  772. 'project' => [
  773. 'location' => 'path',
  774. 'type' => 'string',
  775. 'required' => true,
  776. ],
  777. 'instance' => [
  778. 'location' => 'path',
  779. 'type' => 'string',
  780. 'required' => true,
  781. ],
  782. ],
  783. ],'promoteReplica' => [
  784. 'path' => 'v1/projects/{project}/instances/{instance}/promoteReplica',
  785. 'httpMethod' => 'POST',
  786. 'parameters' => [
  787. 'project' => [
  788. 'location' => 'path',
  789. 'type' => 'string',
  790. 'required' => true,
  791. ],
  792. 'instance' => [
  793. 'location' => 'path',
  794. 'type' => 'string',
  795. 'required' => true,
  796. ],
  797. 'failover' => [
  798. 'location' => 'query',
  799. 'type' => 'boolean',
  800. ],
  801. ],
  802. ],'reencrypt' => [
  803. 'path' => 'v1/projects/{project}/instances/{instance}/reencrypt',
  804. 'httpMethod' => 'POST',
  805. 'parameters' => [
  806. 'project' => [
  807. 'location' => 'path',
  808. 'type' => 'string',
  809. 'required' => true,
  810. ],
  811. 'instance' => [
  812. 'location' => 'path',
  813. 'type' => 'string',
  814. 'required' => true,
  815. ],
  816. ],
  817. ],'releaseSsrsLease' => [
  818. 'path' => 'v1/projects/{project}/instances/{instance}/releaseSsrsLease',
  819. 'httpMethod' => 'POST',
  820. 'parameters' => [
  821. 'project' => [
  822. 'location' => 'path',
  823. 'type' => 'string',
  824. 'required' => true,
  825. ],
  826. 'instance' => [
  827. 'location' => 'path',
  828. 'type' => 'string',
  829. 'required' => true,
  830. ],
  831. ],
  832. ],'resetSslConfig' => [
  833. 'path' => 'v1/projects/{project}/instances/{instance}/resetSslConfig',
  834. 'httpMethod' => 'POST',
  835. 'parameters' => [
  836. 'project' => [
  837. 'location' => 'path',
  838. 'type' => 'string',
  839. 'required' => true,
  840. ],
  841. 'instance' => [
  842. 'location' => 'path',
  843. 'type' => 'string',
  844. 'required' => true,
  845. ],
  846. 'mode' => [
  847. 'location' => 'query',
  848. 'type' => 'string',
  849. ],
  850. ],
  851. ],'restart' => [
  852. 'path' => 'v1/projects/{project}/instances/{instance}/restart',
  853. 'httpMethod' => 'POST',
  854. 'parameters' => [
  855. 'project' => [
  856. 'location' => 'path',
  857. 'type' => 'string',
  858. 'required' => true,
  859. ],
  860. 'instance' => [
  861. 'location' => 'path',
  862. 'type' => 'string',
  863. 'required' => true,
  864. ],
  865. ],
  866. ],'restoreBackup' => [
  867. 'path' => 'v1/projects/{project}/instances/{instance}/restoreBackup',
  868. 'httpMethod' => 'POST',
  869. 'parameters' => [
  870. 'project' => [
  871. 'location' => 'path',
  872. 'type' => 'string',
  873. 'required' => true,
  874. ],
  875. 'instance' => [
  876. 'location' => 'path',
  877. 'type' => 'string',
  878. 'required' => true,
  879. ],
  880. ],
  881. ],'rotateServerCa' => [
  882. 'path' => 'v1/projects/{project}/instances/{instance}/rotateServerCa',
  883. 'httpMethod' => 'POST',
  884. 'parameters' => [
  885. 'project' => [
  886. 'location' => 'path',
  887. 'type' => 'string',
  888. 'required' => true,
  889. ],
  890. 'instance' => [
  891. 'location' => 'path',
  892. 'type' => 'string',
  893. 'required' => true,
  894. ],
  895. ],
  896. ],'startReplica' => [
  897. 'path' => 'v1/projects/{project}/instances/{instance}/startReplica',
  898. 'httpMethod' => 'POST',
  899. 'parameters' => [
  900. 'project' => [
  901. 'location' => 'path',
  902. 'type' => 'string',
  903. 'required' => true,
  904. ],
  905. 'instance' => [
  906. 'location' => 'path',
  907. 'type' => 'string',
  908. 'required' => true,
  909. ],
  910. ],
  911. ],'stopReplica' => [
  912. 'path' => 'v1/projects/{project}/instances/{instance}/stopReplica',
  913. 'httpMethod' => 'POST',
  914. 'parameters' => [
  915. 'project' => [
  916. 'location' => 'path',
  917. 'type' => 'string',
  918. 'required' => true,
  919. ],
  920. 'instance' => [
  921. 'location' => 'path',
  922. 'type' => 'string',
  923. 'required' => true,
  924. ],
  925. ],
  926. ],'switchover' => [
  927. 'path' => 'v1/projects/{project}/instances/{instance}/switchover',
  928. 'httpMethod' => 'POST',
  929. 'parameters' => [
  930. 'project' => [
  931. 'location' => 'path',
  932. 'type' => 'string',
  933. 'required' => true,
  934. ],
  935. 'instance' => [
  936. 'location' => 'path',
  937. 'type' => 'string',
  938. 'required' => true,
  939. ],
  940. 'dbTimeout' => [
  941. 'location' => 'query',
  942. 'type' => 'string',
  943. ],
  944. ],
  945. ],'truncateLog' => [
  946. 'path' => 'v1/projects/{project}/instances/{instance}/truncateLog',
  947. 'httpMethod' => 'POST',
  948. 'parameters' => [
  949. 'project' => [
  950. 'location' => 'path',
  951. 'type' => 'string',
  952. 'required' => true,
  953. ],
  954. 'instance' => [
  955. 'location' => 'path',
  956. 'type' => 'string',
  957. 'required' => true,
  958. ],
  959. ],
  960. ],'update' => [
  961. 'path' => 'v1/projects/{project}/instances/{instance}',
  962. 'httpMethod' => 'PUT',
  963. 'parameters' => [
  964. 'project' => [
  965. 'location' => 'path',
  966. 'type' => 'string',
  967. 'required' => true,
  968. ],
  969. 'instance' => [
  970. 'location' => 'path',
  971. 'type' => 'string',
  972. 'required' => true,
  973. ],
  974. ],
  975. ],
  976. ]
  977. ]
  978. );
  979. $this->operations = new SQLAdmin\Resource\Operations(
  980. $this,
  981. $this->serviceName,
  982. 'operations',
  983. [
  984. 'methods' => [
  985. 'cancel' => [
  986. 'path' => 'v1/projects/{project}/operations/{operation}/cancel',
  987. 'httpMethod' => 'POST',
  988. 'parameters' => [
  989. 'project' => [
  990. 'location' => 'path',
  991. 'type' => 'string',
  992. 'required' => true,
  993. ],
  994. 'operation' => [
  995. 'location' => 'path',
  996. 'type' => 'string',
  997. 'required' => true,
  998. ],
  999. ],
  1000. ],'get' => [
  1001. 'path' => 'v1/projects/{project}/operations/{operation}',
  1002. 'httpMethod' => 'GET',
  1003. 'parameters' => [
  1004. 'project' => [
  1005. 'location' => 'path',
  1006. 'type' => 'string',
  1007. 'required' => true,
  1008. ],
  1009. 'operation' => [
  1010. 'location' => 'path',
  1011. 'type' => 'string',
  1012. 'required' => true,
  1013. ],
  1014. ],
  1015. ],'list' => [
  1016. 'path' => 'v1/projects/{project}/operations',
  1017. 'httpMethod' => 'GET',
  1018. 'parameters' => [
  1019. 'project' => [
  1020. 'location' => 'path',
  1021. 'type' => 'string',
  1022. 'required' => true,
  1023. ],
  1024. 'instance' => [
  1025. 'location' => 'query',
  1026. 'type' => 'string',
  1027. ],
  1028. 'maxResults' => [
  1029. 'location' => 'query',
  1030. 'type' => 'integer',
  1031. ],
  1032. 'pageToken' => [
  1033. 'location' => 'query',
  1034. 'type' => 'string',
  1035. ],
  1036. ],
  1037. ],
  1038. ]
  1039. ]
  1040. );
  1041. $this->projects_instances = new SQLAdmin\Resource\ProjectsInstances(
  1042. $this,
  1043. $this->serviceName,
  1044. 'instances',
  1045. [
  1046. 'methods' => [
  1047. 'getDiskShrinkConfig' => [
  1048. 'path' => 'v1/projects/{project}/instances/{instance}/getDiskShrinkConfig',
  1049. 'httpMethod' => 'GET',
  1050. 'parameters' => [
  1051. 'project' => [
  1052. 'location' => 'path',
  1053. 'type' => 'string',
  1054. 'required' => true,
  1055. ],
  1056. 'instance' => [
  1057. 'location' => 'path',
  1058. 'type' => 'string',
  1059. 'required' => true,
  1060. ],
  1061. ],
  1062. ],'getLatestRecoveryTime' => [
  1063. 'path' => 'v1/projects/{project}/instances/{instance}/getLatestRecoveryTime',
  1064. 'httpMethod' => 'GET',
  1065. 'parameters' => [
  1066. 'project' => [
  1067. 'location' => 'path',
  1068. 'type' => 'string',
  1069. 'required' => true,
  1070. ],
  1071. 'instance' => [
  1072. 'location' => 'path',
  1073. 'type' => 'string',
  1074. 'required' => true,
  1075. ],
  1076. 'sourceInstanceDeletionTime' => [
  1077. 'location' => 'query',
  1078. 'type' => 'string',
  1079. ],
  1080. ],
  1081. ],'performDiskShrink' => [
  1082. 'path' => 'v1/projects/{project}/instances/{instance}/performDiskShrink',
  1083. 'httpMethod' => 'POST',
  1084. 'parameters' => [
  1085. 'project' => [
  1086. 'location' => 'path',
  1087. 'type' => 'string',
  1088. 'required' => true,
  1089. ],
  1090. 'instance' => [
  1091. 'location' => 'path',
  1092. 'type' => 'string',
  1093. 'required' => true,
  1094. ],
  1095. ],
  1096. ],'rescheduleMaintenance' => [
  1097. 'path' => 'v1/projects/{project}/instances/{instance}/rescheduleMaintenance',
  1098. 'httpMethod' => 'POST',
  1099. 'parameters' => [
  1100. 'project' => [
  1101. 'location' => 'path',
  1102. 'type' => 'string',
  1103. 'required' => true,
  1104. ],
  1105. 'instance' => [
  1106. 'location' => 'path',
  1107. 'type' => 'string',
  1108. 'required' => true,
  1109. ],
  1110. ],
  1111. ],'resetReplicaSize' => [
  1112. 'path' => 'v1/projects/{project}/instances/{instance}/resetReplicaSize',
  1113. 'httpMethod' => 'POST',
  1114. 'parameters' => [
  1115. 'project' => [
  1116. 'location' => 'path',
  1117. 'type' => 'string',
  1118. 'required' => true,
  1119. ],
  1120. 'instance' => [
  1121. 'location' => 'path',
  1122. 'type' => 'string',
  1123. 'required' => true,
  1124. ],
  1125. ],
  1126. ],'startExternalSync' => [
  1127. 'path' => 'v1/projects/{project}/instances/{instance}/startExternalSync',
  1128. 'httpMethod' => 'POST',
  1129. 'parameters' => [
  1130. 'project' => [
  1131. 'location' => 'path',
  1132. 'type' => 'string',
  1133. 'required' => true,
  1134. ],
  1135. 'instance' => [
  1136. 'location' => 'path',
  1137. 'type' => 'string',
  1138. 'required' => true,
  1139. ],
  1140. ],
  1141. ],'verifyExternalSyncSettings' => [
  1142. 'path' => 'v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings',
  1143. 'httpMethod' => 'POST',
  1144. 'parameters' => [
  1145. 'project' => [
  1146. 'location' => 'path',
  1147. 'type' => 'string',
  1148. 'required' => true,
  1149. ],
  1150. 'instance' => [
  1151. 'location' => 'path',
  1152. 'type' => 'string',
  1153. 'required' => true,
  1154. ],
  1155. ],
  1156. ],
  1157. ]
  1158. ]
  1159. );
  1160. $this->sslCerts = new SQLAdmin\Resource\SslCerts(
  1161. $this,
  1162. $this->serviceName,
  1163. 'sslCerts',
  1164. [
  1165. 'methods' => [
  1166. 'createEphemeral' => [
  1167. 'path' => 'v1/projects/{project}/instances/{instance}/createEphemeral',
  1168. 'httpMethod' => 'POST',
  1169. 'parameters' => [
  1170. 'project' => [
  1171. 'location' => 'path',
  1172. 'type' => 'string',
  1173. 'required' => true,
  1174. ],
  1175. 'instance' => [
  1176. 'location' => 'path',
  1177. 'type' => 'string',
  1178. 'required' => true,
  1179. ],
  1180. ],
  1181. ],'delete' => [
  1182. 'path' => 'v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}',
  1183. 'httpMethod' => 'DELETE',
  1184. 'parameters' => [
  1185. 'project' => [
  1186. 'location' => 'path',
  1187. 'type' => 'string',
  1188. 'required' => true,
  1189. ],
  1190. 'instance' => [
  1191. 'location' => 'path',
  1192. 'type' => 'string',
  1193. 'required' => true,
  1194. ],
  1195. 'sha1Fingerprint' => [
  1196. 'location' => 'path',
  1197. 'type' => 'string',
  1198. 'required' => true,
  1199. ],
  1200. ],
  1201. ],'get' => [
  1202. 'path' => 'v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}',
  1203. 'httpMethod' => 'GET',
  1204. 'parameters' => [
  1205. 'project' => [
  1206. 'location' => 'path',
  1207. 'type' => 'string',
  1208. 'required' => true,
  1209. ],
  1210. 'instance' => [
  1211. 'location' => 'path',
  1212. 'type' => 'string',
  1213. 'required' => true,
  1214. ],
  1215. 'sha1Fingerprint' => [
  1216. 'location' => 'path',
  1217. 'type' => 'string',
  1218. 'required' => true,
  1219. ],
  1220. ],
  1221. ],'insert' => [
  1222. 'path' => 'v1/projects/{project}/instances/{instance}/sslCerts',
  1223. 'httpMethod' => 'POST',
  1224. 'parameters' => [
  1225. 'project' => [
  1226. 'location' => 'path',
  1227. 'type' => 'string',
  1228. 'required' => true,
  1229. ],
  1230. 'instance' => [
  1231. 'location' => 'path',
  1232. 'type' => 'string',
  1233. 'required' => true,
  1234. ],
  1235. ],
  1236. ],'list' => [
  1237. 'path' => 'v1/projects/{project}/instances/{instance}/sslCerts',
  1238. 'httpMethod' => 'GET',
  1239. 'parameters' => [
  1240. 'project' => [
  1241. 'location' => 'path',
  1242. 'type' => 'string',
  1243. 'required' => true,
  1244. ],
  1245. 'instance' => [
  1246. 'location' => 'path',
  1247. 'type' => 'string',
  1248. 'required' => true,
  1249. ],
  1250. ],
  1251. ],
  1252. ]
  1253. ]
  1254. );
  1255. $this->tiers = new SQLAdmin\Resource\Tiers(
  1256. $this,
  1257. $this->serviceName,
  1258. 'tiers',
  1259. [
  1260. 'methods' => [
  1261. 'list' => [
  1262. 'path' => 'v1/projects/{project}/tiers',
  1263. 'httpMethod' => 'GET',
  1264. 'parameters' => [
  1265. 'project' => [
  1266. 'location' => 'path',
  1267. 'type' => 'string',
  1268. 'required' => true,
  1269. ],
  1270. ],
  1271. ],
  1272. ]
  1273. ]
  1274. );
  1275. $this->users = new SQLAdmin\Resource\Users(
  1276. $this,
  1277. $this->serviceName,
  1278. 'users',
  1279. [
  1280. 'methods' => [
  1281. 'delete' => [
  1282. 'path' => 'v1/projects/{project}/instances/{instance}/users',
  1283. 'httpMethod' => 'DELETE',
  1284. 'parameters' => [
  1285. 'project' => [
  1286. 'location' => 'path',
  1287. 'type' => 'string',
  1288. 'required' => true,
  1289. ],
  1290. 'instance' => [
  1291. 'location' => 'path',
  1292. 'type' => 'string',
  1293. 'required' => true,
  1294. ],
  1295. 'host' => [
  1296. 'location' => 'query',
  1297. 'type' => 'string',
  1298. ],
  1299. 'name' => [
  1300. 'location' => 'query',
  1301. 'type' => 'string',
  1302. ],
  1303. ],
  1304. ],'get' => [
  1305. 'path' => 'v1/projects/{project}/instances/{instance}/users/{name}',
  1306. 'httpMethod' => 'GET',
  1307. 'parameters' => [
  1308. 'project' => [
  1309. 'location' => 'path',
  1310. 'type' => 'string',
  1311. 'required' => true,
  1312. ],
  1313. 'instance' => [
  1314. 'location' => 'path',
  1315. 'type' => 'string',
  1316. 'required' => true,
  1317. ],
  1318. 'name' => [
  1319. 'location' => 'path',
  1320. 'type' => 'string',
  1321. 'required' => true,
  1322. ],
  1323. 'host' => [
  1324. 'location' => 'query',
  1325. 'type' => 'string',
  1326. ],
  1327. ],
  1328. ],'insert' => [
  1329. 'path' => 'v1/projects/{project}/instances/{instance}/users',
  1330. 'httpMethod' => 'POST',
  1331. 'parameters' => [
  1332. 'project' => [
  1333. 'location' => 'path',
  1334. 'type' => 'string',
  1335. 'required' => true,
  1336. ],
  1337. 'instance' => [
  1338. 'location' => 'path',
  1339. 'type' => 'string',
  1340. 'required' => true,
  1341. ],
  1342. ],
  1343. ],'list' => [
  1344. 'path' => 'v1/projects/{project}/instances/{instance}/users',
  1345. 'httpMethod' => 'GET',
  1346. 'parameters' => [
  1347. 'project' => [
  1348. 'location' => 'path',
  1349. 'type' => 'string',
  1350. 'required' => true,
  1351. ],
  1352. 'instance' => [
  1353. 'location' => 'path',
  1354. 'type' => 'string',
  1355. 'required' => true,
  1356. ],
  1357. ],
  1358. ],'update' => [
  1359. 'path' => 'v1/projects/{project}/instances/{instance}/users',
  1360. 'httpMethod' => 'PUT',
  1361. 'parameters' => [
  1362. 'project' => [
  1363. 'location' => 'path',
  1364. 'type' => 'string',
  1365. 'required' => true,
  1366. ],
  1367. 'instance' => [
  1368. 'location' => 'path',
  1369. 'type' => 'string',
  1370. 'required' => true,
  1371. ],
  1372. 'databaseRoles' => [
  1373. 'location' => 'query',
  1374. 'type' => 'string',
  1375. 'repeated' => true,
  1376. ],
  1377. 'host' => [
  1378. 'location' => 'query',
  1379. 'type' => 'string',
  1380. ],
  1381. 'name' => [
  1382. 'location' => 'query',
  1383. 'type' => 'string',
  1384. ],
  1385. 'revokeExistingRoles' => [
  1386. 'location' => 'query',
  1387. 'type' => 'boolean',
  1388. ],
  1389. ],
  1390. ],
  1391. ]
  1392. ]
  1393. );
  1394. }
  1395. }
  1396. // Adding a class alias for backwards compatibility with the previous class name.
  1397. class_alias(SQLAdmin::class, 'Google_Service_SQLAdmin');