google-cloud-sql 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. google/cloud/sqladmin/__init__.py +605 -0
  2. google/cloud/sqladmin/gapic_version.py +16 -0
  3. google/cloud/sqladmin/py.typed +2 -0
  4. google/cloud/sqladmin_v1/__init__.py +616 -0
  5. google/cloud/sqladmin_v1/_compat.py +262 -0
  6. google/cloud/sqladmin_v1/gapic_metadata.json +959 -0
  7. google/cloud/sqladmin_v1/gapic_version.py +16 -0
  8. google/cloud/sqladmin_v1/py.typed +2 -0
  9. google/cloud/sqladmin_v1/services/__init__.py +15 -0
  10. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/__init__.py +22 -0
  11. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/async_client.py +336 -0
  12. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/client.py +613 -0
  13. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/transports/__init__.py +34 -0
  14. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/transports/base.py +159 -0
  15. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/transports/grpc.py +339 -0
  16. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/transports/grpc_asyncio.py +356 -0
  17. google/cloud/sqladmin_v1/services/sql_backup_runs_service/__init__.py +22 -0
  18. google/cloud/sqladmin_v1/services/sql_backup_runs_service/async_client.py +697 -0
  19. google/cloud/sqladmin_v1/services/sql_backup_runs_service/client.py +977 -0
  20. google/cloud/sqladmin_v1/services/sql_backup_runs_service/pagers.py +199 -0
  21. google/cloud/sqladmin_v1/services/sql_backup_runs_service/transports/__init__.py +32 -0
  22. google/cloud/sqladmin_v1/services/sql_backup_runs_service/transports/base.py +225 -0
  23. google/cloud/sqladmin_v1/services/sql_backup_runs_service/transports/grpc.py +456 -0
  24. google/cloud/sqladmin_v1/services/sql_backup_runs_service/transports/grpc_asyncio.py +495 -0
  25. google/cloud/sqladmin_v1/services/sql_backups_service/__init__.py +22 -0
  26. google/cloud/sqladmin_v1/services/sql_backups_service/async_client.py +946 -0
  27. google/cloud/sqladmin_v1/services/sql_backups_service/client.py +1244 -0
  28. google/cloud/sqladmin_v1/services/sql_backups_service/pagers.py +197 -0
  29. google/cloud/sqladmin_v1/services/sql_backups_service/transports/__init__.py +32 -0
  30. google/cloud/sqladmin_v1/services/sql_backups_service/transports/base.py +237 -0
  31. google/cloud/sqladmin_v1/services/sql_backups_service/transports/grpc.py +478 -0
  32. google/cloud/sqladmin_v1/services/sql_backups_service/transports/grpc_asyncio.py +527 -0
  33. google/cloud/sqladmin_v1/services/sql_connect_service/__init__.py +22 -0
  34. google/cloud/sqladmin_v1/services/sql_connect_service/async_client.py +591 -0
  35. google/cloud/sqladmin_v1/services/sql_connect_service/client.py +867 -0
  36. google/cloud/sqladmin_v1/services/sql_connect_service/transports/__init__.py +32 -0
  37. google/cloud/sqladmin_v1/services/sql_connect_service/transports/base.py +215 -0
  38. google/cloud/sqladmin_v1/services/sql_connect_service/transports/grpc.py +430 -0
  39. google/cloud/sqladmin_v1/services/sql_connect_service/transports/grpc_asyncio.py +464 -0
  40. google/cloud/sqladmin_v1/services/sql_databases_service/__init__.py +22 -0
  41. google/cloud/sqladmin_v1/services/sql_databases_service/async_client.py +872 -0
  42. google/cloud/sqladmin_v1/services/sql_databases_service/client.py +1152 -0
  43. google/cloud/sqladmin_v1/services/sql_databases_service/transports/__init__.py +32 -0
  44. google/cloud/sqladmin_v1/services/sql_databases_service/transports/base.py +251 -0
  45. google/cloud/sqladmin_v1/services/sql_databases_service/transports/grpc.py +515 -0
  46. google/cloud/sqladmin_v1/services/sql_databases_service/transports/grpc_asyncio.py +568 -0
  47. google/cloud/sqladmin_v1/services/sql_events_service/__init__.py +22 -0
  48. google/cloud/sqladmin_v1/services/sql_events_service/async_client.py +311 -0
  49. google/cloud/sqladmin_v1/services/sql_events_service/client.py +593 -0
  50. google/cloud/sqladmin_v1/services/sql_events_service/transports/__init__.py +32 -0
  51. google/cloud/sqladmin_v1/services/sql_events_service/transports/base.py +159 -0
  52. google/cloud/sqladmin_v1/services/sql_events_service/transports/grpc.py +337 -0
  53. google/cloud/sqladmin_v1/services/sql_events_service/transports/grpc_asyncio.py +354 -0
  54. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/__init__.py +22 -0
  55. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/async_client.py +327 -0
  56. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/client.py +605 -0
  57. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/transports/__init__.py +32 -0
  58. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/transports/base.py +159 -0
  59. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/transports/grpc.py +337 -0
  60. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/transports/grpc_asyncio.py +356 -0
  61. google/cloud/sqladmin_v1/services/sql_flags_service/__init__.py +22 -0
  62. google/cloud/sqladmin_v1/services/sql_flags_service/async_client.py +386 -0
  63. google/cloud/sqladmin_v1/services/sql_flags_service/client.py +667 -0
  64. google/cloud/sqladmin_v1/services/sql_flags_service/transports/__init__.py +32 -0
  65. google/cloud/sqladmin_v1/services/sql_flags_service/transports/base.py +181 -0
  66. google/cloud/sqladmin_v1/services/sql_flags_service/transports/grpc.py +367 -0
  67. google/cloud/sqladmin_v1/services/sql_flags_service/transports/grpc_asyncio.py +391 -0
  68. google/cloud/sqladmin_v1/services/sql_iam_policies_service/__init__.py +22 -0
  69. google/cloud/sqladmin_v1/services/sql_iam_policies_service/async_client.py +315 -0
  70. google/cloud/sqladmin_v1/services/sql_iam_policies_service/client.py +593 -0
  71. google/cloud/sqladmin_v1/services/sql_iam_policies_service/transports/__init__.py +32 -0
  72. google/cloud/sqladmin_v1/services/sql_iam_policies_service/transports/base.py +159 -0
  73. google/cloud/sqladmin_v1/services/sql_iam_policies_service/transports/grpc.py +336 -0
  74. google/cloud/sqladmin_v1/services/sql_iam_policies_service/transports/grpc_asyncio.py +353 -0
  75. google/cloud/sqladmin_v1/services/sql_instance_names_service/__init__.py +22 -0
  76. google/cloud/sqladmin_v1/services/sql_instance_names_service/async_client.py +321 -0
  77. google/cloud/sqladmin_v1/services/sql_instance_names_service/client.py +595 -0
  78. google/cloud/sqladmin_v1/services/sql_instance_names_service/transports/__init__.py +32 -0
  79. google/cloud/sqladmin_v1/services/sql_instance_names_service/transports/base.py +159 -0
  80. google/cloud/sqladmin_v1/services/sql_instance_names_service/transports/grpc.py +336 -0
  81. google/cloud/sqladmin_v1/services/sql_instance_names_service/transports/grpc_asyncio.py +353 -0
  82. google/cloud/sqladmin_v1/services/sql_instances_service/__init__.py +22 -0
  83. google/cloud/sqladmin_v1/services/sql_instances_service/async_client.py +4519 -0
  84. google/cloud/sqladmin_v1/services/sql_instances_service/client.py +4833 -0
  85. google/cloud/sqladmin_v1/services/sql_instances_service/pagers.py +197 -0
  86. google/cloud/sqladmin_v1/services/sql_instances_service/transports/__init__.py +32 -0
  87. google/cloud/sqladmin_v1/services/sql_instances_service/transports/base.py +801 -0
  88. google/cloud/sqladmin_v1/services/sql_instances_service/transports/grpc.py +1661 -0
  89. google/cloud/sqladmin_v1/services/sql_instances_service/transports/grpc_asyncio.py +1904 -0
  90. google/cloud/sqladmin_v1/services/sql_operations_service/__init__.py +22 -0
  91. google/cloud/sqladmin_v1/services/sql_operations_service/async_client.py +591 -0
  92. google/cloud/sqladmin_v1/services/sql_operations_service/client.py +871 -0
  93. google/cloud/sqladmin_v1/services/sql_operations_service/pagers.py +197 -0
  94. google/cloud/sqladmin_v1/services/sql_operations_service/transports/__init__.py +32 -0
  95. google/cloud/sqladmin_v1/services/sql_operations_service/transports/base.py +210 -0
  96. google/cloud/sqladmin_v1/services/sql_operations_service/transports/grpc.py +426 -0
  97. google/cloud/sqladmin_v1/services/sql_operations_service/transports/grpc_asyncio.py +462 -0
  98. google/cloud/sqladmin_v1/services/sql_regions_service/__init__.py +22 -0
  99. google/cloud/sqladmin_v1/services/sql_regions_service/async_client.py +314 -0
  100. google/cloud/sqladmin_v1/services/sql_regions_service/client.py +596 -0
  101. google/cloud/sqladmin_v1/services/sql_regions_service/transports/__init__.py +32 -0
  102. google/cloud/sqladmin_v1/services/sql_regions_service/transports/base.py +159 -0
  103. google/cloud/sqladmin_v1/services/sql_regions_service/transports/grpc.py +338 -0
  104. google/cloud/sqladmin_v1/services/sql_regions_service/transports/grpc_asyncio.py +355 -0
  105. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/__init__.py +22 -0
  106. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/async_client.py +680 -0
  107. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/client.py +960 -0
  108. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/transports/__init__.py +32 -0
  109. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/transports/base.py +226 -0
  110. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/transports/grpc.py +461 -0
  111. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/transports/grpc_asyncio.py +501 -0
  112. google/cloud/sqladmin_v1/services/sql_tiers_service/__init__.py +22 -0
  113. google/cloud/sqladmin_v1/services/sql_tiers_service/async_client.py +395 -0
  114. google/cloud/sqladmin_v1/services/sql_tiers_service/client.py +676 -0
  115. google/cloud/sqladmin_v1/services/sql_tiers_service/transports/__init__.py +32 -0
  116. google/cloud/sqladmin_v1/services/sql_tiers_service/transports/base.py +181 -0
  117. google/cloud/sqladmin_v1/services/sql_tiers_service/transports/grpc.py +369 -0
  118. google/cloud/sqladmin_v1/services/sql_tiers_service/transports/grpc_asyncio.py +393 -0
  119. google/cloud/sqladmin_v1/services/sql_users_service/__init__.py +22 -0
  120. google/cloud/sqladmin_v1/services/sql_users_service/async_client.py +754 -0
  121. google/cloud/sqladmin_v1/services/sql_users_service/client.py +1035 -0
  122. google/cloud/sqladmin_v1/services/sql_users_service/transports/__init__.py +32 -0
  123. google/cloud/sqladmin_v1/services/sql_users_service/transports/base.py +237 -0
  124. google/cloud/sqladmin_v1/services/sql_users_service/transports/grpc.py +477 -0
  125. google/cloud/sqladmin_v1/services/sql_users_service/transports/grpc_asyncio.py +526 -0
  126. google/cloud/sqladmin_v1/types/__init__.py +472 -0
  127. google/cloud/sqladmin_v1/types/cloud_sql_available_database_versions.py +24 -0
  128. google/cloud/sqladmin_v1/types/cloud_sql_backup_runs.py +438 -0
  129. google/cloud/sqladmin_v1/types/cloud_sql_backups.py +467 -0
  130. google/cloud/sqladmin_v1/types/cloud_sql_connect.py +385 -0
  131. google/cloud/sqladmin_v1/types/cloud_sql_databases.py +202 -0
  132. google/cloud/sqladmin_v1/types/cloud_sql_events.py +24 -0
  133. google/cloud/sqladmin_v1/types/cloud_sql_feature_eligibility.py +24 -0
  134. google/cloud/sqladmin_v1/types/cloud_sql_flags.py +272 -0
  135. google/cloud/sqladmin_v1/types/cloud_sql_iam_policies.py +24 -0
  136. google/cloud/sqladmin_v1/types/cloud_sql_instance_names.py +24 -0
  137. google/cloud/sqladmin_v1/types/cloud_sql_instances.py +4514 -0
  138. google/cloud/sqladmin_v1/types/cloud_sql_operations.py +164 -0
  139. google/cloud/sqladmin_v1/types/cloud_sql_regions.py +24 -0
  140. google/cloud/sqladmin_v1/types/cloud_sql_resources.py +4678 -0
  141. google/cloud/sqladmin_v1/types/cloud_sql_ssl_certs.py +220 -0
  142. google/cloud/sqladmin_v1/types/cloud_sql_tiers.py +108 -0
  143. google/cloud/sqladmin_v1/types/cloud_sql_users.py +571 -0
  144. google/cloud/sqladmin_v1beta4/__init__.py +583 -0
  145. google/cloud/sqladmin_v1beta4/_compat.py +262 -0
  146. google/cloud/sqladmin_v1beta4/gapic_metadata.json +1371 -0
  147. google/cloud/sqladmin_v1beta4/gapic_version.py +16 -0
  148. google/cloud/sqladmin_v1beta4/py.typed +2 -0
  149. google/cloud/sqladmin_v1beta4/services/__init__.py +15 -0
  150. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/__init__.py +22 -0
  151. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/async_client.py +689 -0
  152. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/client.py +971 -0
  153. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/pagers.py +197 -0
  154. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/__init__.py +36 -0
  155. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/base.py +223 -0
  156. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/grpc.py +449 -0
  157. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/grpc_asyncio.py +490 -0
  158. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/rest.py +1038 -0
  159. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/rest_base.py +150 -0
  160. google/cloud/sqladmin_v1beta4/services/sql_backups_service/__init__.py +22 -0
  161. google/cloud/sqladmin_v1beta4/services/sql_backups_service/async_client.py +941 -0
  162. google/cloud/sqladmin_v1beta4/services/sql_backups_service/client.py +1241 -0
  163. google/cloud/sqladmin_v1beta4/services/sql_backups_service/pagers.py +197 -0
  164. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/__init__.py +36 -0
  165. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/base.py +234 -0
  166. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/grpc.py +470 -0
  167. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/grpc_asyncio.py +521 -0
  168. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/rest.py +1238 -0
  169. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/rest_base.py +175 -0
  170. google/cloud/sqladmin_v1beta4/services/sql_connect_service/__init__.py +22 -0
  171. google/cloud/sqladmin_v1beta4/services/sql_connect_service/async_client.py +591 -0
  172. google/cloud/sqladmin_v1beta4/services/sql_connect_service/client.py +869 -0
  173. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/__init__.py +36 -0
  174. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/base.py +215 -0
  175. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/grpc.py +430 -0
  176. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/grpc_asyncio.py +464 -0
  177. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/rest.py +852 -0
  178. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/rest_base.py +138 -0
  179. google/cloud/sqladmin_v1beta4/services/sql_data_service/__init__.py +22 -0
  180. google/cloud/sqladmin_v1beta4/services/sql_data_service/async_client.py +444 -0
  181. google/cloud/sqladmin_v1beta4/services/sql_data_service/client.py +739 -0
  182. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/__init__.py +36 -0
  183. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/base.py +181 -0
  184. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/grpc.py +407 -0
  185. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/grpc_asyncio.py +431 -0
  186. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/rest.py +213 -0
  187. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/rest_base.py +97 -0
  188. google/cloud/sqladmin_v1beta4/services/sql_databases_service/__init__.py +22 -0
  189. google/cloud/sqladmin_v1beta4/services/sql_databases_service/async_client.py +860 -0
  190. google/cloud/sqladmin_v1beta4/services/sql_databases_service/client.py +1142 -0
  191. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/__init__.py +36 -0
  192. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/base.py +251 -0
  193. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/grpc.py +502 -0
  194. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/grpc_asyncio.py +561 -0
  195. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/rest.py +1468 -0
  196. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/rest_base.py +180 -0
  197. google/cloud/sqladmin_v1beta4/services/sql_flags_service/__init__.py +22 -0
  198. google/cloud/sqladmin_v1beta4/services/sql_flags_service/async_client.py +386 -0
  199. google/cloud/sqladmin_v1beta4/services/sql_flags_service/client.py +669 -0
  200. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/__init__.py +36 -0
  201. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/base.py +181 -0
  202. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/grpc.py +365 -0
  203. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/grpc_asyncio.py +389 -0
  204. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/rest.py +392 -0
  205. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/rest_base.py +107 -0
  206. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/__init__.py +22 -0
  207. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/async_client.py +315 -0
  208. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/client.py +595 -0
  209. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/__init__.py +39 -0
  210. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/base.py +159 -0
  211. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/grpc.py +336 -0
  212. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/grpc_asyncio.py +353 -0
  213. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/rest.py +184 -0
  214. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/rest_base.py +91 -0
  215. google/cloud/sqladmin_v1beta4/services/sql_instances_service/__init__.py +22 -0
  216. google/cloud/sqladmin_v1beta4/services/sql_instances_service/async_client.py +4399 -0
  217. google/cloud/sqladmin_v1beta4/services/sql_instances_service/client.py +4715 -0
  218. google/cloud/sqladmin_v1beta4/services/sql_instances_service/pagers.py +197 -0
  219. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/__init__.py +36 -0
  220. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/base.py +801 -0
  221. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/grpc.py +1627 -0
  222. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/grpc_asyncio.py +1895 -0
  223. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/rest.py +9625 -0
  224. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/rest_base.py +744 -0
  225. google/cloud/sqladmin_v1beta4/services/sql_operations_service/__init__.py +22 -0
  226. google/cloud/sqladmin_v1beta4/services/sql_operations_service/async_client.py +585 -0
  227. google/cloud/sqladmin_v1beta4/services/sql_operations_service/client.py +867 -0
  228. google/cloud/sqladmin_v1beta4/services/sql_operations_service/pagers.py +197 -0
  229. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/__init__.py +36 -0
  230. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/base.py +210 -0
  231. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/grpc.py +422 -0
  232. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/grpc_asyncio.py +458 -0
  233. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/rest.py +744 -0
  234. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/rest_base.py +136 -0
  235. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/__init__.py +22 -0
  236. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/async_client.py +672 -0
  237. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/client.py +954 -0
  238. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/__init__.py +36 -0
  239. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/base.py +226 -0
  240. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/grpc.py +453 -0
  241. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/grpc_asyncio.py +497 -0
  242. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/rest.py +1036 -0
  243. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/rest_base.py +150 -0
  244. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/__init__.py +22 -0
  245. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/async_client.py +393 -0
  246. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/client.py +676 -0
  247. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/__init__.py +36 -0
  248. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/base.py +181 -0
  249. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/grpc.py +368 -0
  250. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/grpc_asyncio.py +392 -0
  251. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/rest.py +396 -0
  252. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/rest_base.py +107 -0
  253. google/cloud/sqladmin_v1beta4/services/sql_users_service/__init__.py +22 -0
  254. google/cloud/sqladmin_v1beta4/services/sql_users_service/async_client.py +754 -0
  255. google/cloud/sqladmin_v1beta4/services/sql_users_service/client.py +1037 -0
  256. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/__init__.py +36 -0
  257. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/base.py +237 -0
  258. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/grpc.py +475 -0
  259. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/grpc_asyncio.py +524 -0
  260. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/rest.py +1249 -0
  261. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/rest_base.py +165 -0
  262. google/cloud/sqladmin_v1beta4/types/__init__.py +480 -0
  263. google/cloud/sqladmin_v1beta4/types/cloud_sql.py +2666 -0
  264. google/cloud/sqladmin_v1beta4/types/cloud_sql_connect.py +386 -0
  265. google/cloud/sqladmin_v1beta4/types/cloud_sql_data.py +339 -0
  266. google/cloud/sqladmin_v1beta4/types/cloud_sql_iam_policies.py +24 -0
  267. google/cloud/sqladmin_v1beta4/types/cloud_sql_resources.py +8111 -0
  268. google/cloud/sqladmin_v1beta4/types/cloud_sql_tiers.py +108 -0
  269. google/cloud/sqladmin_v1beta4/types/cloud_sql_users.py +573 -0
  270. google_cloud_sql-0.1.1.dist-info/METADATA +239 -0
  271. google_cloud_sql-0.1.1.dist-info/RECORD +274 -0
  272. google_cloud_sql-0.1.1.dist-info/WHEEL +5 -0
  273. google_cloud_sql-0.1.1.dist-info/licenses/LICENSE +202 -0
  274. google_cloud_sql-0.1.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,860 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ import logging as std_logging
17
+ import re
18
+ from collections import OrderedDict
19
+ from typing import (
20
+ Callable,
21
+ Dict,
22
+ Mapping,
23
+ MutableMapping,
24
+ MutableSequence,
25
+ Optional,
26
+ Sequence,
27
+ Tuple,
28
+ Type,
29
+ Union,
30
+ )
31
+
32
+ import google.protobuf
33
+ from google.api_core import exceptions as core_exceptions
34
+ from google.api_core import gapic_v1
35
+ from google.api_core import retry_async as retries
36
+ from google.api_core.client_options import ClientOptions
37
+ from google.auth import credentials as ga_credentials # type: ignore
38
+ from google.oauth2 import service_account # type: ignore
39
+
40
+ from google.cloud.sqladmin_v1beta4 import gapic_version as package_version
41
+
42
+ try:
43
+ OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault, None]
44
+ except AttributeError: # pragma: NO COVER
45
+ OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore
46
+
47
+ import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
48
+ from google.cloud.location import locations_pb2 # type: ignore
49
+ from google.longrunning import operations_pb2 # type: ignore
50
+
51
+ from google.cloud.sqladmin_v1beta4.types import cloud_sql, cloud_sql_resources
52
+
53
+ from .client import SqlDatabasesServiceClient
54
+ from .transports.base import DEFAULT_CLIENT_INFO, SqlDatabasesServiceTransport
55
+ from .transports.grpc_asyncio import SqlDatabasesServiceGrpcAsyncIOTransport
56
+
57
+ try:
58
+ from google.api_core import client_logging # type: ignore
59
+
60
+ CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
61
+ except ImportError: # pragma: NO COVER
62
+ CLIENT_LOGGING_SUPPORTED = False
63
+
64
+ _LOGGER = std_logging.getLogger(__name__)
65
+
66
+
67
+ class SqlDatabasesServiceAsyncClient:
68
+ """"""
69
+
70
+ _client: SqlDatabasesServiceClient
71
+
72
+ # Copy defaults from the synchronous client for use here.
73
+ # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead.
74
+ DEFAULT_ENDPOINT = SqlDatabasesServiceClient.DEFAULT_ENDPOINT
75
+ DEFAULT_MTLS_ENDPOINT = SqlDatabasesServiceClient.DEFAULT_MTLS_ENDPOINT
76
+ _DEFAULT_ENDPOINT_TEMPLATE = SqlDatabasesServiceClient._DEFAULT_ENDPOINT_TEMPLATE
77
+ _DEFAULT_UNIVERSE = SqlDatabasesServiceClient._DEFAULT_UNIVERSE
78
+
79
+ common_billing_account_path = staticmethod(
80
+ SqlDatabasesServiceClient.common_billing_account_path
81
+ )
82
+ parse_common_billing_account_path = staticmethod(
83
+ SqlDatabasesServiceClient.parse_common_billing_account_path
84
+ )
85
+ common_folder_path = staticmethod(SqlDatabasesServiceClient.common_folder_path)
86
+ parse_common_folder_path = staticmethod(
87
+ SqlDatabasesServiceClient.parse_common_folder_path
88
+ )
89
+ common_organization_path = staticmethod(
90
+ SqlDatabasesServiceClient.common_organization_path
91
+ )
92
+ parse_common_organization_path = staticmethod(
93
+ SqlDatabasesServiceClient.parse_common_organization_path
94
+ )
95
+ common_project_path = staticmethod(SqlDatabasesServiceClient.common_project_path)
96
+ parse_common_project_path = staticmethod(
97
+ SqlDatabasesServiceClient.parse_common_project_path
98
+ )
99
+ common_location_path = staticmethod(SqlDatabasesServiceClient.common_location_path)
100
+ parse_common_location_path = staticmethod(
101
+ SqlDatabasesServiceClient.parse_common_location_path
102
+ )
103
+
104
+ @classmethod
105
+ def from_service_account_info(cls, info: dict, *args, **kwargs):
106
+ """Creates an instance of this client using the provided credentials
107
+ info.
108
+
109
+ Args:
110
+ info (dict): The service account private key info.
111
+ args: Additional arguments to pass to the constructor.
112
+ kwargs: Additional arguments to pass to the constructor.
113
+
114
+ Returns:
115
+ SqlDatabasesServiceAsyncClient: The constructed client.
116
+ """
117
+ sa_info_func = (
118
+ SqlDatabasesServiceClient.from_service_account_info.__func__ # type: ignore
119
+ )
120
+ return sa_info_func(SqlDatabasesServiceAsyncClient, info, *args, **kwargs)
121
+
122
+ @classmethod
123
+ def from_service_account_file(cls, filename: str, *args, **kwargs):
124
+ """Creates an instance of this client using the provided credentials
125
+ file.
126
+
127
+ Args:
128
+ filename (str): The path to the service account private key json
129
+ file.
130
+ args: Additional arguments to pass to the constructor.
131
+ kwargs: Additional arguments to pass to the constructor.
132
+
133
+ Returns:
134
+ SqlDatabasesServiceAsyncClient: The constructed client.
135
+ """
136
+ sa_file_func = (
137
+ SqlDatabasesServiceClient.from_service_account_file.__func__ # type: ignore
138
+ )
139
+ return sa_file_func(SqlDatabasesServiceAsyncClient, filename, *args, **kwargs)
140
+
141
+ from_service_account_json = from_service_account_file
142
+
143
+ @classmethod
144
+ def get_mtls_endpoint_and_cert_source(
145
+ cls, client_options: Optional[ClientOptions] = None
146
+ ):
147
+ """Return the API endpoint and client cert source for mutual TLS.
148
+
149
+ The client cert source is determined in the following order:
150
+ (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the
151
+ client cert source is None.
152
+ (2) if `client_options.client_cert_source` is provided, use the provided one; if the
153
+ default client cert source exists, use the default one; otherwise the client cert
154
+ source is None.
155
+
156
+ The API endpoint is determined in the following order:
157
+ (1) if `client_options.api_endpoint` if provided, use the provided one.
158
+ (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
159
+ default mTLS endpoint; if the environment variable is "never", use the default API
160
+ endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
161
+ use the default API endpoint.
162
+
163
+ More details can be found at https://google.aip.dev/auth/4114.
164
+
165
+ Args:
166
+ client_options (google.api_core.client_options.ClientOptions): Custom options for the
167
+ client. Only the `api_endpoint` and `client_cert_source` properties may be used
168
+ in this method.
169
+
170
+ Returns:
171
+ Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the
172
+ client cert source to use.
173
+
174
+ Raises:
175
+ google.auth.exceptions.MutualTLSChannelError: If any errors happen.
176
+ """
177
+ return SqlDatabasesServiceClient.get_mtls_endpoint_and_cert_source(
178
+ client_options
179
+ ) # type: ignore
180
+
181
+ @property
182
+ def transport(self) -> SqlDatabasesServiceTransport:
183
+ """Returns the transport used by the client instance.
184
+
185
+ Returns:
186
+ SqlDatabasesServiceTransport: The transport used by the client instance.
187
+ """
188
+ return self._client.transport
189
+
190
+ @property
191
+ def api_endpoint(self) -> str:
192
+ """Return the API endpoint used by the client instance.
193
+
194
+ Returns:
195
+ str: The API endpoint used by the client instance.
196
+ """
197
+ return self._client._api_endpoint
198
+
199
+ @property
200
+ def universe_domain(self) -> str:
201
+ """Return the universe domain used by the client instance.
202
+
203
+ Returns:
204
+ str: The universe domain used
205
+ by the client instance.
206
+ """
207
+ return self._client._universe_domain
208
+
209
+ get_transport_class = SqlDatabasesServiceClient.get_transport_class
210
+
211
+ def __init__(
212
+ self,
213
+ *,
214
+ credentials: Optional[ga_credentials.Credentials] = None,
215
+ transport: Optional[
216
+ Union[
217
+ str,
218
+ SqlDatabasesServiceTransport,
219
+ Callable[..., SqlDatabasesServiceTransport],
220
+ ]
221
+ ] = "grpc_asyncio",
222
+ client_options: Optional[ClientOptions] = None,
223
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
224
+ ) -> None:
225
+ """Instantiates the sql databases service async client.
226
+
227
+ Args:
228
+ credentials (Optional[google.auth.credentials.Credentials]): The
229
+ authorization credentials to attach to requests. These
230
+ credentials identify the application to the service; if none
231
+ are specified, the client will attempt to ascertain the
232
+ credentials from the environment.
233
+ transport (Optional[Union[str,SqlDatabasesServiceTransport,Callable[..., SqlDatabasesServiceTransport]]]):
234
+ The transport to use, or a Callable that constructs and returns a new transport to use.
235
+ If a Callable is given, it will be called with the same set of initialization
236
+ arguments as used in the SqlDatabasesServiceTransport constructor.
237
+ If set to None, a transport is chosen automatically.
238
+ client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]):
239
+ Custom options for the client.
240
+
241
+ 1. The ``api_endpoint`` property can be used to override the
242
+ default endpoint provided by the client when ``transport`` is
243
+ not explicitly provided. Only if this property is not set and
244
+ ``transport`` was not explicitly provided, the endpoint is
245
+ determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment
246
+ variable, which have one of the following values:
247
+ "always" (always use the default mTLS endpoint), "never" (always
248
+ use the default regular endpoint) and "auto" (auto-switch to the
249
+ default mTLS endpoint if client certificate is present; this is
250
+ the default value).
251
+
252
+ 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable
253
+ is "true", then the ``client_cert_source`` property can be used
254
+ to provide a client certificate for mTLS transport. If
255
+ not provided, the default SSL client certificate will be used if
256
+ present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not
257
+ set, no client certificate will be used.
258
+
259
+ 3. The ``universe_domain`` property can be used to override the
260
+ default "googleapis.com" universe. Note that ``api_endpoint``
261
+ property still takes precedence; and ``universe_domain`` is
262
+ currently not supported for mTLS.
263
+
264
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
265
+ The client info used to send a user-agent string along with
266
+ API requests. If ``None``, then default info will be used.
267
+ Generally, you only need to set this if you're developing
268
+ your own client library.
269
+
270
+ Raises:
271
+ google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
272
+ creation failed for any reason.
273
+ """
274
+ self._client = SqlDatabasesServiceClient(
275
+ credentials=credentials,
276
+ transport=transport,
277
+ client_options=client_options,
278
+ client_info=client_info,
279
+ )
280
+
281
+ if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
282
+ std_logging.DEBUG
283
+ ): # pragma: NO COVER
284
+ _LOGGER.debug(
285
+ "Created client `google.cloud.sql_v1beta4.SqlDatabasesServiceAsyncClient`.",
286
+ extra={
287
+ "serviceName": "google.cloud.sql.v1beta4.SqlDatabasesService",
288
+ "universeDomain": getattr(
289
+ self._client._transport._credentials, "universe_domain", ""
290
+ ),
291
+ "credentialsType": f"{type(self._client._transport._credentials).__module__}.{type(self._client._transport._credentials).__qualname__}",
292
+ "credentialsInfo": getattr(
293
+ self.transport._credentials, "get_cred_info", lambda: None
294
+ )(),
295
+ }
296
+ if hasattr(self._client._transport, "_credentials")
297
+ else {
298
+ "serviceName": "google.cloud.sql.v1beta4.SqlDatabasesService",
299
+ "credentialsType": None,
300
+ },
301
+ )
302
+
303
+ async def delete(
304
+ self,
305
+ request: Optional[Union[cloud_sql.SqlDatabasesDeleteRequest, dict]] = None,
306
+ *,
307
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
308
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
309
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
310
+ ) -> cloud_sql_resources.Operation:
311
+ r"""Deletes a database from a Cloud SQL instance.
312
+
313
+ .. code-block:: python
314
+
315
+ # This snippet has been automatically generated and should be regarded as a
316
+ # code template only.
317
+ # It will require modifications to work:
318
+ # - It may require correct/in-range values for request initialization.
319
+ # - It may require specifying regional endpoints when creating the service
320
+ # client as shown in:
321
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
322
+ from google.cloud import sqladmin_v1beta4
323
+
324
+ async def sample_delete():
325
+ # Create a client
326
+ client = sqladmin_v1beta4.SqlDatabasesServiceAsyncClient()
327
+
328
+ # Initialize request argument(s)
329
+ request = sqladmin_v1beta4.SqlDatabasesDeleteRequest(
330
+ )
331
+
332
+ # Make the request
333
+ response = await client.delete(request=request)
334
+
335
+ # Handle the response
336
+ print(response)
337
+
338
+ Args:
339
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.SqlDatabasesDeleteRequest, dict]]):
340
+ The request object.
341
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
342
+ should be retried.
343
+ timeout (float): The timeout for this request.
344
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
345
+ sent along with the request as metadata. Normally, each value must be of type `str`,
346
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
347
+ be of type `bytes`.
348
+
349
+ Returns:
350
+ google.cloud.sqladmin_v1beta4.types.Operation:
351
+ An Operation resource. For
352
+ successful operations that return an
353
+ Operation resource, only the fields
354
+ relevant to the operation are populated
355
+ in the resource.
356
+
357
+ """
358
+ # Create or coerce a protobuf request object.
359
+ # - Use the request object if provided (there's no risk of modifying the input as
360
+ # there are no flattened fields), or create one.
361
+ if not isinstance(request, cloud_sql.SqlDatabasesDeleteRequest):
362
+ request = cloud_sql.SqlDatabasesDeleteRequest(request)
363
+
364
+ # Wrap the RPC method; this adds retry and timeout information,
365
+ # and friendly error handling.
366
+ rpc = self._client._transport._wrapped_methods[self._client._transport.delete]
367
+
368
+ # Certain fields should be provided within the metadata header;
369
+ # add these here.
370
+ metadata = tuple(metadata) + (
371
+ gapic_v1.routing_header.to_grpc_metadata(
372
+ (
373
+ ("project", request.project),
374
+ ("instance", request.instance),
375
+ ("database", request.database),
376
+ )
377
+ ),
378
+ )
379
+
380
+ # Validate the universe domain.
381
+ self._client._validate_universe_domain()
382
+
383
+ # Send the request.
384
+ response = await rpc(
385
+ request,
386
+ retry=retry,
387
+ timeout=timeout,
388
+ metadata=metadata,
389
+ )
390
+
391
+ # Done; return the response.
392
+ return response
393
+
394
+ async def get(
395
+ self,
396
+ request: Optional[Union[cloud_sql.SqlDatabasesGetRequest, dict]] = None,
397
+ *,
398
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
399
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
400
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
401
+ ) -> cloud_sql_resources.Database:
402
+ r"""Retrieves a resource containing information about a
403
+ database inside a Cloud SQL instance.
404
+
405
+ .. code-block:: python
406
+
407
+ # This snippet has been automatically generated and should be regarded as a
408
+ # code template only.
409
+ # It will require modifications to work:
410
+ # - It may require correct/in-range values for request initialization.
411
+ # - It may require specifying regional endpoints when creating the service
412
+ # client as shown in:
413
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
414
+ from google.cloud import sqladmin_v1beta4
415
+
416
+ async def sample_get():
417
+ # Create a client
418
+ client = sqladmin_v1beta4.SqlDatabasesServiceAsyncClient()
419
+
420
+ # Initialize request argument(s)
421
+ request = sqladmin_v1beta4.SqlDatabasesGetRequest(
422
+ )
423
+
424
+ # Make the request
425
+ response = await client.get(request=request)
426
+
427
+ # Handle the response
428
+ print(response)
429
+
430
+ Args:
431
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.SqlDatabasesGetRequest, dict]]):
432
+ The request object.
433
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
434
+ should be retried.
435
+ timeout (float): The timeout for this request.
436
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
437
+ sent along with the request as metadata. Normally, each value must be of type `str`,
438
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
439
+ be of type `bytes`.
440
+
441
+ Returns:
442
+ google.cloud.sqladmin_v1beta4.types.Database:
443
+ Represents a SQL database on the
444
+ Cloud SQL instance.
445
+
446
+ """
447
+ # Create or coerce a protobuf request object.
448
+ # - Use the request object if provided (there's no risk of modifying the input as
449
+ # there are no flattened fields), or create one.
450
+ if not isinstance(request, cloud_sql.SqlDatabasesGetRequest):
451
+ request = cloud_sql.SqlDatabasesGetRequest(request)
452
+
453
+ # Wrap the RPC method; this adds retry and timeout information,
454
+ # and friendly error handling.
455
+ rpc = self._client._transport._wrapped_methods[self._client._transport.get]
456
+
457
+ # Certain fields should be provided within the metadata header;
458
+ # add these here.
459
+ metadata = tuple(metadata) + (
460
+ gapic_v1.routing_header.to_grpc_metadata(
461
+ (
462
+ ("project", request.project),
463
+ ("instance", request.instance),
464
+ ("database", request.database),
465
+ )
466
+ ),
467
+ )
468
+
469
+ # Validate the universe domain.
470
+ self._client._validate_universe_domain()
471
+
472
+ # Send the request.
473
+ response = await rpc(
474
+ request,
475
+ retry=retry,
476
+ timeout=timeout,
477
+ metadata=metadata,
478
+ )
479
+
480
+ # Done; return the response.
481
+ return response
482
+
483
+ async def insert(
484
+ self,
485
+ request: Optional[Union[cloud_sql.SqlDatabasesInsertRequest, dict]] = None,
486
+ *,
487
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
488
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
489
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
490
+ ) -> cloud_sql_resources.Operation:
491
+ r"""Inserts a resource containing information about a database
492
+ inside a Cloud SQL instance.
493
+
494
+ **Note:** You can't modify the default character set and
495
+ collation.
496
+
497
+ .. code-block:: python
498
+
499
+ # This snippet has been automatically generated and should be regarded as a
500
+ # code template only.
501
+ # It will require modifications to work:
502
+ # - It may require correct/in-range values for request initialization.
503
+ # - It may require specifying regional endpoints when creating the service
504
+ # client as shown in:
505
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
506
+ from google.cloud import sqladmin_v1beta4
507
+
508
+ async def sample_insert():
509
+ # Create a client
510
+ client = sqladmin_v1beta4.SqlDatabasesServiceAsyncClient()
511
+
512
+ # Initialize request argument(s)
513
+ request = sqladmin_v1beta4.SqlDatabasesInsertRequest(
514
+ )
515
+
516
+ # Make the request
517
+ response = await client.insert(request=request)
518
+
519
+ # Handle the response
520
+ print(response)
521
+
522
+ Args:
523
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.SqlDatabasesInsertRequest, dict]]):
524
+ The request object.
525
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
526
+ should be retried.
527
+ timeout (float): The timeout for this request.
528
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
529
+ sent along with the request as metadata. Normally, each value must be of type `str`,
530
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
531
+ be of type `bytes`.
532
+
533
+ Returns:
534
+ google.cloud.sqladmin_v1beta4.types.Operation:
535
+ An Operation resource. For
536
+ successful operations that return an
537
+ Operation resource, only the fields
538
+ relevant to the operation are populated
539
+ in the resource.
540
+
541
+ """
542
+ # Create or coerce a protobuf request object.
543
+ # - Use the request object if provided (there's no risk of modifying the input as
544
+ # there are no flattened fields), or create one.
545
+ if not isinstance(request, cloud_sql.SqlDatabasesInsertRequest):
546
+ request = cloud_sql.SqlDatabasesInsertRequest(request)
547
+
548
+ # Wrap the RPC method; this adds retry and timeout information,
549
+ # and friendly error handling.
550
+ rpc = self._client._transport._wrapped_methods[self._client._transport.insert]
551
+
552
+ # Certain fields should be provided within the metadata header;
553
+ # add these here.
554
+ metadata = tuple(metadata) + (
555
+ gapic_v1.routing_header.to_grpc_metadata(
556
+ (
557
+ ("project", request.project),
558
+ ("instance", request.instance),
559
+ )
560
+ ),
561
+ )
562
+
563
+ # Validate the universe domain.
564
+ self._client._validate_universe_domain()
565
+
566
+ # Send the request.
567
+ response = await rpc(
568
+ request,
569
+ retry=retry,
570
+ timeout=timeout,
571
+ metadata=metadata,
572
+ )
573
+
574
+ # Done; return the response.
575
+ return response
576
+
577
+ async def list(
578
+ self,
579
+ request: Optional[Union[cloud_sql.SqlDatabasesListRequest, dict]] = None,
580
+ *,
581
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
582
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
583
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
584
+ ) -> cloud_sql_resources.DatabasesListResponse:
585
+ r"""Lists databases in the specified Cloud SQL instance.
586
+
587
+ .. code-block:: python
588
+
589
+ # This snippet has been automatically generated and should be regarded as a
590
+ # code template only.
591
+ # It will require modifications to work:
592
+ # - It may require correct/in-range values for request initialization.
593
+ # - It may require specifying regional endpoints when creating the service
594
+ # client as shown in:
595
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
596
+ from google.cloud import sqladmin_v1beta4
597
+
598
+ async def sample_list():
599
+ # Create a client
600
+ client = sqladmin_v1beta4.SqlDatabasesServiceAsyncClient()
601
+
602
+ # Initialize request argument(s)
603
+ request = sqladmin_v1beta4.SqlDatabasesListRequest(
604
+ )
605
+
606
+ # Make the request
607
+ response = await client.list(request=request)
608
+
609
+ # Handle the response
610
+ print(response)
611
+
612
+ Args:
613
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.SqlDatabasesListRequest, dict]]):
614
+ The request object.
615
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
616
+ should be retried.
617
+ timeout (float): The timeout for this request.
618
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
619
+ sent along with the request as metadata. Normally, each value must be of type `str`,
620
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
621
+ be of type `bytes`.
622
+
623
+ Returns:
624
+ google.cloud.sqladmin_v1beta4.types.DatabasesListResponse:
625
+ Database list response.
626
+ """
627
+ # Create or coerce a protobuf request object.
628
+ # - Use the request object if provided (there's no risk of modifying the input as
629
+ # there are no flattened fields), or create one.
630
+ if not isinstance(request, cloud_sql.SqlDatabasesListRequest):
631
+ request = cloud_sql.SqlDatabasesListRequest(request)
632
+
633
+ # Wrap the RPC method; this adds retry and timeout information,
634
+ # and friendly error handling.
635
+ rpc = self._client._transport._wrapped_methods[self._client._transport.list]
636
+
637
+ # Certain fields should be provided within the metadata header;
638
+ # add these here.
639
+ metadata = tuple(metadata) + (
640
+ gapic_v1.routing_header.to_grpc_metadata(
641
+ (
642
+ ("project", request.project),
643
+ ("instance", request.instance),
644
+ )
645
+ ),
646
+ )
647
+
648
+ # Validate the universe domain.
649
+ self._client._validate_universe_domain()
650
+
651
+ # Send the request.
652
+ response = await rpc(
653
+ request,
654
+ retry=retry,
655
+ timeout=timeout,
656
+ metadata=metadata,
657
+ )
658
+
659
+ # Done; return the response.
660
+ return response
661
+
662
+ async def patch(
663
+ self,
664
+ request: Optional[Union[cloud_sql.SqlDatabasesUpdateRequest, dict]] = None,
665
+ *,
666
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
667
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
668
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
669
+ ) -> cloud_sql_resources.Operation:
670
+ r"""Partially updates a resource containing information
671
+ about a database inside a Cloud SQL instance. This
672
+ method supports patch semantics.
673
+
674
+ .. code-block:: python
675
+
676
+ # This snippet has been automatically generated and should be regarded as a
677
+ # code template only.
678
+ # It will require modifications to work:
679
+ # - It may require correct/in-range values for request initialization.
680
+ # - It may require specifying regional endpoints when creating the service
681
+ # client as shown in:
682
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
683
+ from google.cloud import sqladmin_v1beta4
684
+
685
+ async def sample_patch():
686
+ # Create a client
687
+ client = sqladmin_v1beta4.SqlDatabasesServiceAsyncClient()
688
+
689
+ # Initialize request argument(s)
690
+ request = sqladmin_v1beta4.SqlDatabasesUpdateRequest(
691
+ )
692
+
693
+ # Make the request
694
+ response = await client.patch(request=request)
695
+
696
+ # Handle the response
697
+ print(response)
698
+
699
+ Args:
700
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.SqlDatabasesUpdateRequest, dict]]):
701
+ The request object.
702
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
703
+ should be retried.
704
+ timeout (float): The timeout for this request.
705
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
706
+ sent along with the request as metadata. Normally, each value must be of type `str`,
707
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
708
+ be of type `bytes`.
709
+
710
+ Returns:
711
+ google.cloud.sqladmin_v1beta4.types.Operation:
712
+ An Operation resource. For
713
+ successful operations that return an
714
+ Operation resource, only the fields
715
+ relevant to the operation are populated
716
+ in the resource.
717
+
718
+ """
719
+ # Create or coerce a protobuf request object.
720
+ # - Use the request object if provided (there's no risk of modifying the input as
721
+ # there are no flattened fields), or create one.
722
+ if not isinstance(request, cloud_sql.SqlDatabasesUpdateRequest):
723
+ request = cloud_sql.SqlDatabasesUpdateRequest(request)
724
+
725
+ # Wrap the RPC method; this adds retry and timeout information,
726
+ # and friendly error handling.
727
+ rpc = self._client._transport._wrapped_methods[self._client._transport.patch]
728
+
729
+ # Certain fields should be provided within the metadata header;
730
+ # add these here.
731
+ metadata = tuple(metadata) + (
732
+ gapic_v1.routing_header.to_grpc_metadata(
733
+ (
734
+ ("project", request.project),
735
+ ("instance", request.instance),
736
+ ("database", request.database),
737
+ )
738
+ ),
739
+ )
740
+
741
+ # Validate the universe domain.
742
+ self._client._validate_universe_domain()
743
+
744
+ # Send the request.
745
+ response = await rpc(
746
+ request,
747
+ retry=retry,
748
+ timeout=timeout,
749
+ metadata=metadata,
750
+ )
751
+
752
+ # Done; return the response.
753
+ return response
754
+
755
+ async def update(
756
+ self,
757
+ request: Optional[Union[cloud_sql.SqlDatabasesUpdateRequest, dict]] = None,
758
+ *,
759
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
760
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
761
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
762
+ ) -> cloud_sql_resources.Operation:
763
+ r"""Updates a resource containing information about a
764
+ database inside a Cloud SQL instance.
765
+
766
+ .. code-block:: python
767
+
768
+ # This snippet has been automatically generated and should be regarded as a
769
+ # code template only.
770
+ # It will require modifications to work:
771
+ # - It may require correct/in-range values for request initialization.
772
+ # - It may require specifying regional endpoints when creating the service
773
+ # client as shown in:
774
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
775
+ from google.cloud import sqladmin_v1beta4
776
+
777
+ async def sample_update():
778
+ # Create a client
779
+ client = sqladmin_v1beta4.SqlDatabasesServiceAsyncClient()
780
+
781
+ # Initialize request argument(s)
782
+ request = sqladmin_v1beta4.SqlDatabasesUpdateRequest(
783
+ )
784
+
785
+ # Make the request
786
+ response = await client.update(request=request)
787
+
788
+ # Handle the response
789
+ print(response)
790
+
791
+ Args:
792
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.SqlDatabasesUpdateRequest, dict]]):
793
+ The request object.
794
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
795
+ should be retried.
796
+ timeout (float): The timeout for this request.
797
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
798
+ sent along with the request as metadata. Normally, each value must be of type `str`,
799
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
800
+ be of type `bytes`.
801
+
802
+ Returns:
803
+ google.cloud.sqladmin_v1beta4.types.Operation:
804
+ An Operation resource. For
805
+ successful operations that return an
806
+ Operation resource, only the fields
807
+ relevant to the operation are populated
808
+ in the resource.
809
+
810
+ """
811
+ # Create or coerce a protobuf request object.
812
+ # - Use the request object if provided (there's no risk of modifying the input as
813
+ # there are no flattened fields), or create one.
814
+ if not isinstance(request, cloud_sql.SqlDatabasesUpdateRequest):
815
+ request = cloud_sql.SqlDatabasesUpdateRequest(request)
816
+
817
+ # Wrap the RPC method; this adds retry and timeout information,
818
+ # and friendly error handling.
819
+ rpc = self._client._transport._wrapped_methods[self._client._transport.update]
820
+
821
+ # Certain fields should be provided within the metadata header;
822
+ # add these here.
823
+ metadata = tuple(metadata) + (
824
+ gapic_v1.routing_header.to_grpc_metadata(
825
+ (
826
+ ("project", request.project),
827
+ ("instance", request.instance),
828
+ ("database", request.database),
829
+ )
830
+ ),
831
+ )
832
+
833
+ # Validate the universe domain.
834
+ self._client._validate_universe_domain()
835
+
836
+ # Send the request.
837
+ response = await rpc(
838
+ request,
839
+ retry=retry,
840
+ timeout=timeout,
841
+ metadata=metadata,
842
+ )
843
+
844
+ # Done; return the response.
845
+ return response
846
+
847
+ async def __aenter__(self) -> "SqlDatabasesServiceAsyncClient":
848
+ return self
849
+
850
+ async def __aexit__(self, exc_type, exc, tb):
851
+ await self.transport.close()
852
+
853
+
854
+ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
855
+ gapic_version=package_version.__version__
856
+ )
857
+ DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
858
+
859
+
860
+ __all__ = ("SqlDatabasesServiceAsyncClient",)