oci-cli 3.68.1__py3-none-any.whl → 3.70.0__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 (323) hide show
  1. common_util/ignored_commands.py +1 -0
  2. oci_cli/bin/psa.psm1 +51 -0
  3. oci_cli/help_text_producer/data_files/text/cmdref/ai/language/endpoint/create.txt +0 -8
  4. oci_cli/help_text_producer/data_files/text/cmdref/compute/boot-volume-attachment/attach.txt +1 -1
  5. oci_cli/help_text_producer/data_files/text/cmdref/compute/compute-host/list.txt +6 -0
  6. oci_cli/help_text_producer/data_files/text/cmdref/compute/console-history/capture.txt +1 -1
  7. oci_cli/help_text_producer/data_files/text/cmdref/compute/device/list-instance.txt +1 -1
  8. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/action.txt +1 -1
  9. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/attach-vnic.txt +1 -1
  10. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/change-compartment.txt +1 -1
  11. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/get-windows-initial-creds.txt +1 -1
  12. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/get.txt +1 -1
  13. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/launch.txt +1 -1
  14. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/terminate.txt +1 -1
  15. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update-instance-amd-vm-update-instance-platform-config.txt +1 -1
  16. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update-instance-intel-vm-update-instance-platform-config.txt +1 -1
  17. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update-instance-update-instance-source-via-boot-volume-details.txt +1 -1
  18. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update-instance-update-instance-source-via-image-details.txt +1 -1
  19. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update.txt +1 -1
  20. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance-console-connection/create.txt +1 -1
  21. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance-console-connection/delete.txt +1 -1
  22. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance-console-connection/get-plink-connection-string.txt +1 -1
  23. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance-console-connection/get.txt +1 -1
  24. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance-console-connection/update.txt +1 -1
  25. oci_cli/help_text_producer/data_files/text/cmdref/compute/instance-maintenance-reboot/get.txt +1 -1
  26. oci_cli/help_text_producer/data_files/text/cmdref/compute/measured-boot-report/accept-shielded-integrity-policy.txt +1 -1
  27. oci_cli/help_text_producer/data_files/text/cmdref/compute/measured-boot-report/get.txt +1 -1
  28. oci_cli/help_text_producer/data_files/text/cmdref/compute/volume-attachment/attach-iscsi-volume.txt +1 -1
  29. oci_cli/help_text_producer/data_files/text/cmdref/compute/volume-attachment/attach-paravirtualized-volume.txt +1 -1
  30. oci_cli/help_text_producer/data_files/text/cmdref/compute/volume-attachment/attach.txt +1 -1
  31. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-configuration/create-from-instance.txt +1 -1
  32. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-pool/create.txt +11 -0
  33. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-pool/update.txt +11 -0
  34. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-pool-instance/attach.txt +2 -2
  35. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-pool-instance/detach.txt +1 -1
  36. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-pool-instance/get.txt +1 -1
  37. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-pool-instance/termination-proceed.txt +116 -0
  38. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-pool-instance.txt +2 -0
  39. oci_cli/help_text_producer/data_files/text/cmdref/compute-management.txt +2 -0
  40. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database/change-dataguard-role.txt +1 -1
  41. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database/convert-standby.txt +1 -1
  42. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database/create-autonomous-container-database-create-autonomous-container-database-details.txt +7 -7
  43. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database/create-autonomous-container-database-create-autonomous-container-database-from-backup-details.txt +7 -7
  44. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database/create.txt +7 -7
  45. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database-backup.txt +1 -1
  46. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database-version.txt +1 -1
  47. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/change-autonomous-database-subscription.txt +1 -1
  48. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/change-compartment.txt +2 -2
  49. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/change-disaster-recovery-configuration.txt +6 -6
  50. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/configure-key.txt +1 -1
  51. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/configure-saas-admin-user.txt +3 -3
  52. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-adb-cross-region-data-guard-details.txt +105 -102
  53. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-autonomous-database-create-cross-region-disaster-recovery-details.txt +114 -111
  54. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-autonomous-database-gcp-key-details.txt +108 -105
  55. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-autonomous-database-undelete-autonomous-database-details.txt +109 -106
  56. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-cross-tenancy-disaster-recovery-details.txt +111 -108
  57. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-from-backup-id.txt +109 -106
  58. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-from-backup-timestamp.txt +110 -107
  59. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-from-clone.txt +105 -102
  60. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-refreshable-clone.txt +109 -106
  61. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create.txt +102 -99
  62. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/data-safe/deregister.txt +1 -1
  63. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/data-safe/register.txt +1 -1
  64. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/delete.txt +3 -3
  65. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/disable-autonomous-database-management.txt +1 -1
  66. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/disable-operations-insights.txt +1 -1
  67. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/enable-autonomous-database-management.txt +1 -1
  68. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/enable-operations-insights.txt +1 -1
  69. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/fail-over.txt +1 -1
  70. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/generate-wallet.txt +2 -1
  71. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/get.txt +1 -1
  72. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/list-autonomous-database-peers.txt +1 -1
  73. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/list-clones.txt +2 -2
  74. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/list-refreshable-clones.txt +3 -3
  75. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/list-resource-pool-members.txt +2 -2
  76. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/list.txt +7 -7
  77. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/manual-refresh.txt +5 -5
  78. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/restart.txt +1 -1
  79. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/restore.txt +1 -1
  80. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/saas-admin-user-status.txt +1 -1
  81. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/start.txt +1 -1
  82. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/stop.txt +1 -1
  83. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/switchover.txt +1 -1
  84. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/update-autonomous-database-gcp-key-details.txt +125 -110
  85. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/update.txt +123 -108
  86. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-backup/create.txt +2 -2
  87. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-backup/delete.txt +1 -1
  88. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-backup/get.txt +2 -2
  89. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-backup/list.txt +1 -1
  90. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-backup/update.txt +3 -3
  91. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-backup.txt +1 -1
  92. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-character-sets/list.txt +5 -5
  93. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-character-sets.txt +1 -1
  94. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-dataguard/get.txt +1 -1
  95. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-dataguard/list.txt +1 -1
  96. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-dataguard.txt +4 -4
  97. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-software-image/change-compartment.txt +2 -2
  98. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-software-image/create.txt +4 -4
  99. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-software-image/delete.txt +2 -2
  100. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-software-image/get.txt +2 -2
  101. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-software-image/list.txt +3 -3
  102. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-software-image/update.txt +3 -3
  103. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-software-image.txt +2 -2
  104. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-wallet/get-metadata.txt +1 -1
  105. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-wallet/get-regional-wallet-metadata.txt +1 -1
  106. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-wallet/rotate-regional-wallet.txt +1 -1
  107. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-wallet/rotate.txt +1 -1
  108. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-wallet.txt +1 -1
  109. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database.txt +1 -1
  110. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-db-preview-version/list.txt +2 -2
  111. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-db-preview-version.txt +2 -2
  112. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-db-version/list.txt +4 -4
  113. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-db-version.txt +1 -1
  114. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-exadata-infrastructure/launch.txt +8 -7
  115. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-exadata-infrastructure/update.txt +2 -2
  116. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-autonomous-vm-cluster/create.txt +12 -12
  117. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-autonomous-vm-cluster/update.txt +10 -10
  118. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/add-storage.txt +2 -2
  119. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/change-compartment.txt +4 -3
  120. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/create.txt +1 -1
  121. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/delete.txt +2 -2
  122. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/get.txt +1 -1
  123. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/list.txt +1 -1
  124. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/update.txt +2 -2
  125. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-vm-cluster/create.txt +2 -2
  126. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-vm-cluster/update.txt +2 -2
  127. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-database-create-stand-by-database-details.txt +2 -2
  128. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-database-from-backup.txt +2 -2
  129. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-from-backup.txt +2 -2
  130. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-from-database.txt +2 -2
  131. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-standby-database.txt +2 -2
  132. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create.txt +2 -2
  133. oci_cli/help_text_producer/data_files/text/cmdref/db/database/migrate-vault-key.txt +2 -2
  134. oci_cli/help_text_producer/data_files/text/cmdref/db/database/set-oci-db-key-version.txt +2 -2
  135. oci_cli/help_text_producer/data_files/text/cmdref/db/db-home/create.txt +2 -2
  136. oci_cli/help_text_producer/data_files/text/cmdref/db/dbnode-snapshot/delete.txt +129 -0
  137. oci_cli/help_text_producer/data_files/text/cmdref/db/dbnode-snapshot/get.txt +92 -0
  138. oci_cli/help_text_producer/data_files/text/cmdref/db/dbnode-snapshot/list.txt +153 -0
  139. oci_cli/help_text_producer/data_files/text/cmdref/db/dbnode-snapshot/mount.txt +131 -0
  140. oci_cli/help_text_producer/data_files/text/cmdref/db/dbnode-snapshot/unmount.txt +131 -0
  141. oci_cli/help_text_producer/data_files/text/cmdref/db/dbnode-snapshot.txt +22 -0
  142. oci_cli/help_text_producer/data_files/text/cmdref/db/exadb-vm-cluster/add.txt +154 -0
  143. oci_cli/help_text_producer/data_files/text/cmdref/db/exadb-vm-cluster/create.txt +2 -2
  144. oci_cli/help_text_producer/data_files/text/cmdref/db/exadb-vm-cluster/update.txt +2 -2
  145. oci_cli/help_text_producer/data_files/text/cmdref/db/exadb-vm-cluster.txt +2 -0
  146. oci_cli/help_text_producer/data_files/text/cmdref/db/maintenance-run/create.txt +1 -1
  147. oci_cli/help_text_producer/data_files/text/cmdref/db/maintenance-run/list.txt +1 -1
  148. oci_cli/help_text_producer/data_files/text/cmdref/db/pluggable-database/set-oci-pdb-key-version.txt +2 -2
  149. oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-backup.txt +4 -4
  150. oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-database.txt +4 -4
  151. oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-db-system.txt +4 -4
  152. oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch.txt +4 -4
  153. oci_cli/help_text_producer/data_files/text/cmdref/db/system/update.txt +2 -2
  154. oci_cli/help_text_producer/data_files/text/cmdref/db.txt +14 -0
  155. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/add-lock.txt +1 -1
  156. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/change-compartment.txt +2 -2
  157. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/create-generic-jdbc.txt +11 -2
  158. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/create-mysql-database.txt +11 -2
  159. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/create-oracle-database.txt +10 -1
  160. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/create-postgresql.txt +11 -2
  161. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/delete.txt +1 -1
  162. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/list.txt +13 -5
  163. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/remove-lock.txt +1 -1
  164. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/update-generic-jdbc.txt +2 -2
  165. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/update-mysql-database.txt +3 -3
  166. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/update-oracle-database.txt +2 -2
  167. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection/update-postgresql.txt +3 -3
  168. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/connection.txt +2 -1
  169. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/endpoint-service/list.txt +1 -1
  170. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/add-lock.txt +230 -0
  171. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/change-compartment.txt +136 -0
  172. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/create-oracle-database-resource-principal.txt +175 -0
  173. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/delete.txt +133 -0
  174. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/get.txt +91 -0
  175. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/list.txt +157 -0
  176. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/refresh-oracle-database-resource-principal-credential.txt +125 -0
  177. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/remove-lock.txt +230 -0
  178. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/update-oracle-database-resource-principal.txt +164 -0
  179. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity/validate-oracle-database-resource-principal-credential.txt +101 -0
  180. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/identity.txt +32 -0
  181. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/private-endpoint/add-lock.txt +1 -1
  182. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/private-endpoint/change-compartment.txt +1 -1
  183. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/private-endpoint/create.txt +1 -1
  184. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/private-endpoint/delete.txt +1 -1
  185. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/private-endpoint/list.txt +1 -1
  186. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/private-endpoint/remove-lock.txt +1 -1
  187. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/private-endpoint/update.txt +1 -1
  188. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/private-endpoint.txt +2 -1
  189. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/work-request/get.txt +1 -1
  190. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/work-request/list.txt +2 -2
  191. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/work-request-error/list.txt +1 -1
  192. oci_cli/help_text_producer/data_files/text/cmdref/dbtools/work-request-log-entry/list.txt +1 -1
  193. oci_cli/help_text_producer/data_files/text/cmdref/dbtools.txt +22 -0
  194. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error/{list-errors.txt → list.txt} +5 -5
  195. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error.txt +1 -1
  196. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log/{list-logs.txt → list.txt} +5 -5
  197. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log.txt +1 -1
  198. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request.txt +2 -2
  199. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +2 -2
  200. oci_cli/help_text_producer/data_files/text/cmdref/disaster-recovery/automatic-dr-configuration/create.txt +204 -0
  201. oci_cli/help_text_producer/data_files/text/cmdref/disaster-recovery/automatic-dr-configuration/delete.txt +146 -0
  202. oci_cli/help_text_producer/data_files/text/cmdref/disaster-recovery/automatic-dr-configuration/get.txt +108 -0
  203. oci_cli/help_text_producer/data_files/text/cmdref/disaster-recovery/automatic-dr-configuration/list.txt +189 -0
  204. oci_cli/help_text_producer/data_files/text/cmdref/disaster-recovery/automatic-dr-configuration/update.txt +224 -0
  205. oci_cli/help_text_producer/data_files/text/cmdref/disaster-recovery/automatic-dr-configuration.txt +22 -0
  206. oci_cli/help_text_producer/data_files/text/cmdref/disaster-recovery/dr-plan-execution/update.txt +1 -1
  207. oci_cli/help_text_producer/data_files/text/cmdref/disaster-recovery/dr-protection-group/list.txt +1 -1
  208. oci_cli/help_text_producer/data_files/text/cmdref/disaster-recovery.txt +12 -0
  209. oci_cli/help_text_producer/data_files/text/cmdref/distributed-database/distributed-autonomous-db-service/distributed-autonomous-database/change-distributed-autonomous-db-backup-config.txt +159 -0
  210. oci_cli/help_text_producer/data_files/text/cmdref/distributed-database/distributed-autonomous-db-service/distributed-autonomous-database/create.txt +42 -12
  211. oci_cli/help_text_producer/data_files/text/cmdref/distributed-database/distributed-autonomous-db-service/distributed-autonomous-database/rotate-distributed-autonomous-database-passwords.txt +3 -2
  212. oci_cli/help_text_producer/data_files/text/cmdref/distributed-database/distributed-autonomous-db-service/distributed-autonomous-database.txt +2 -0
  213. oci_cli/help_text_producer/data_files/text/cmdref/distributed-database/distributed-autonomous-db-service.txt +2 -0
  214. oci_cli/help_text_producer/data_files/text/cmdref/distributed-database/distributed-db-service/distributed-database/create.txt +31 -11
  215. oci_cli/help_text_producer/data_files/text/cmdref/distributed-database/distributed-db-service/distributed-database/rotate-distributed-database-passwords.txt +3 -2
  216. oci_cli/help_text_producer/data_files/text/cmdref/distributed-database.txt +2 -0
  217. oci_cli/help_text_producer/data_files/text/cmdref/fs/mount-target/create.txt +19 -0
  218. oci_cli/help_text_producer/data_files/text/cmdref/fs/mount-target/update.txt +19 -0
  219. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log/list.txt → work-request-log-entry/list-work-request-logs.txt} +5 -5
  220. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log.txt → work-request-log-entry.txt} +3 -3
  221. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request.txt +2 -2
  222. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane.txt +2 -2
  223. oci_cli/help_text_producer/data_files/text/cmdref/identity-domains/social-identity-provider/create.txt +20 -0
  224. oci_cli/help_text_producer/data_files/text/cmdref/identity-domains/{social-identity-providers → social-identity-provider}/list.txt +2 -2
  225. oci_cli/help_text_producer/data_files/text/cmdref/identity-domains/social-identity-provider/put.txt +20 -0
  226. oci_cli/help_text_producer/data_files/text/cmdref/identity-domains/{social-identity-providers → social-identity-provider}/search.txt +3 -3
  227. oci_cli/help_text_producer/data_files/text/cmdref/identity-domains/social-identity-provider.txt +4 -0
  228. oci_cli/help_text_producer/data_files/text/cmdref/identity-domains.txt +2 -4
  229. oci_cli/help_text_producer/data_files/text/cmdref/lb/load-balancer/update.txt +25 -0
  230. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/change-compartment.txt +148 -0
  231. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/create.txt +217 -0
  232. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/delete.txt +146 -0
  233. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/get-sync-job.txt +122 -0
  234. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/get.txt +108 -0
  235. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/list-sync-jobs.txt +167 -0
  236. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/start-export-to-object.txt +118 -0
  237. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/start-import-from-object.txt +118 -0
  238. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/stop-export-to-object.txt +118 -0
  239. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/stop-import-from-object.txt +118 -0
  240. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link/update.txt +200 -0
  241. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link-collection/list-object-storage-links.txt +154 -0
  242. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link-collection.txt +16 -0
  243. oci_cli/help_text_producer/data_files/text/cmdref/lfs/object-storage-link.txt +42 -0
  244. oci_cli/help_text_producer/data_files/text/cmdref/lfs.txt +28 -0
  245. oci_cli/help_text_producer/data_files/text/cmdref/network/ipam/get-subnet-cidr-utilization.txt +1 -1
  246. oci_cli/help_text_producer/data_files/text/cmdref/network/ipam/get-subnet-ip-inventory.txt +1 -1
  247. oci_cli/help_text_producer/data_files/text/cmdref/network/private-ip/create.txt +18 -0
  248. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/add-ipv4-subnet-cidr.txt +143 -0
  249. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/add-ipv6-subnet-cidr.txt +1 -1
  250. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/change-compartment.txt +1 -1
  251. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/create.txt +28 -13
  252. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/delete.txt +1 -1
  253. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/get.txt +1 -1
  254. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/modify-ipv4-subnet-cidr.txt +148 -0
  255. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/remove-ipv4-subnet-cidr.txt +145 -0
  256. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/remove-ipv6-subnet-cidr.txt +1 -1
  257. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet/update.txt +1 -1
  258. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet-topology/get.txt +1 -1
  259. oci_cli/help_text_producer/data_files/text/cmdref/network/subnet.txt +6 -0
  260. oci_cli/help_text_producer/data_files/text/cmdref/network/vnic/assign-private-ip.txt +18 -0
  261. oci_cli/help_text_producer/data_files/text/cmdref/network.txt +6 -0
  262. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list.txt → list-errors.txt} +5 -5
  263. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
  264. oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +1 -1
  265. oci_cli/help_text_producer/data_files/text/cmdref/psa/private-service-access/change-compartment.txt +136 -0
  266. oci_cli/help_text_producer/data_files/text/cmdref/psa/private-service-access/create.txt +214 -0
  267. oci_cli/help_text_producer/data_files/text/cmdref/psa/private-service-access/delete.txt +133 -0
  268. oci_cli/help_text_producer/data_files/text/cmdref/psa/private-service-access/get.txt +95 -0
  269. oci_cli/help_text_producer/data_files/text/cmdref/psa/private-service-access/list.txt +152 -0
  270. oci_cli/help_text_producer/data_files/text/cmdref/psa/private-service-access/update.txt +211 -0
  271. oci_cli/help_text_producer/data_files/text/cmdref/psa/private-service-access.txt +25 -0
  272. oci_cli/help_text_producer/data_files/text/cmdref/psa/psa-services/list.txt +129 -0
  273. oci_cli/help_text_producer/data_files/text/cmdref/psa/psa-services.txt +16 -0
  274. oci_cli/help_text_producer/data_files/text/cmdref/psa/work-request/cancel.txt +103 -0
  275. oci_cli/help_text_producer/data_files/text/cmdref/psa/work-request/get.txt +91 -0
  276. oci_cli/help_text_producer/data_files/text/cmdref/psa/work-request/list.txt +140 -0
  277. oci_cli/help_text_producer/data_files/text/cmdref/psa/work-request-error/list.txt +131 -0
  278. oci_cli/help_text_producer/data_files/text/cmdref/psa/work-request-error.txt +15 -0
  279. oci_cli/help_text_producer/data_files/text/cmdref/psa/work-request-log/list.txt +131 -0
  280. oci_cli/help_text_producer/data_files/text/cmdref/psa/work-request-log.txt +15 -0
  281. oci_cli/help_text_producer/data_files/text/cmdref/psa/work-request.txt +23 -0
  282. oci_cli/help_text_producer/data_files/text/cmdref/psa.txt +47 -0
  283. oci_cli/help_text_producer/data_files/text/cmdref/session/authenticate.txt +9 -9
  284. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +6 -6
  285. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
  286. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
  287. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
  288. oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
  289. oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
  290. oci_cli/help_text_producer/data_files/text/index.txt +2 -0
  291. oci_cli/service_mapping.py +5 -0
  292. oci_cli/version.py +1 -1
  293. {oci_cli-3.68.1.dist-info → oci_cli-3.70.0.dist-info}/METADATA +3 -3
  294. {oci_cli-3.68.1.dist-info → oci_cli-3.70.0.dist-info}/RECORD +322 -253
  295. services/ai_language/src/oci_cli_ai_service_language/generated/aiservicelanguage_cli.py +1 -5
  296. services/core/src/oci_cli_compute/generated/compute_cli.py +4 -1
  297. services/core/src/oci_cli_compute_management/generated/computemanagement_cli.py +44 -9
  298. services/core/src/oci_cli_virtual_network/generated/virtualnetwork_cli.py +245 -10
  299. services/core/src/oci_cli_virtual_network/virtualnetwork_cli_extended.py +11 -1
  300. services/database/src/oci_cli_database/generated/database_cli.py +1507 -1216
  301. services/database_tools/src/oci_cli_database_tools/databasetools_cli_extended.py +198 -4
  302. services/database_tools/src/oci_cli_database_tools/generated/databasetools_cli.py +926 -53
  303. services/disaster_recovery/src/oci_cli_disaster_recovery/generated/disasterrecovery_cli.py +366 -2
  304. services/distributed_database/src/oci_cli_distributed_autonomous_db_service/generated/distributedautonomousdbservice_cli.py +77 -12
  305. services/distributed_database/src/oci_cli_distributed_db_service/generated/distributeddbservice_cli.py +8 -8
  306. services/file_storage/src/oci_cli_file_storage/generated/filestorage_cli.py +20 -8
  307. services/identity_domains/src/oci_cli_identity_domains/generated/identitydomains_cli.py +36 -11
  308. services/load_balancer/src/oci_cli_load_balancer/generated/loadbalancer_cli.py +17 -5
  309. services/lustre_file_storage/src/oci_cli_lustre_file_storage/generated/lustrefilestorage_cli.py +581 -0
  310. services/psa/__init__.py +4 -0
  311. services/psa/src/__init__.py +4 -0
  312. services/psa/src/oci_cli_private_service_access/__init__.py +4 -0
  313. services/psa/src/oci_cli_private_service_access/generated/__init__.py +4 -0
  314. services/psa/src/oci_cli_private_service_access/generated/client_mappings.py +14 -0
  315. services/psa/src/oci_cli_private_service_access/generated/privateserviceaccess_cli.py +738 -0
  316. services/psa/src/oci_cli_private_service_access/privateserviceaccess_cli_extended.py +92 -0
  317. services/psa/tests/__init__.py +4 -0
  318. oci_cli/help_text_producer/data_files/text/cmdref/identity-domains/social-identity-providers.txt +0 -20
  319. {oci_cli-3.68.1.dist-info → oci_cli-3.70.0.dist-info}/LICENSE.txt +0 -0
  320. {oci_cli-3.68.1.dist-info → oci_cli-3.70.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  321. {oci_cli-3.68.1.dist-info → oci_cli-3.70.0.dist-info}/WHEEL +0 -0
  322. {oci_cli-3.68.1.dist-info → oci_cli-3.70.0.dist-info}/entry_points.txt +0 -0
  323. {oci_cli-3.68.1.dist-info → oci_cli-3.70.0.dist-info}/top_level.txt +0 -0
@@ -28,12 +28,18 @@ def database_tools_endpoint_service_group():
28
28
  pass
29
29
 
30
30
 
31
- @click.command(cli_util.override('dbtools.database_tools_private_endpoint_group.command_name', 'database-tools-private-endpoint'), cls=CommandGroupWithAlias, help="""Description of Database Tools private endpoint.""")
31
+ @click.command(cli_util.override('dbtools.database_tools_private_endpoint_group.command_name', 'database-tools-private-endpoint'), cls=CommandGroupWithAlias, help="""Allows the Database Tools service to connect to databases in a customer's virtual cloud network (VCN).""")
32
32
  @cli_util.help_option_group
33
33
  def database_tools_private_endpoint_group():
34
34
  pass
35
35
 
36
36
 
37
+ @click.command(cli_util.override('dbtools.database_tools_identity_group.command_name', 'database-tools-identity'), cls=CommandGroupWithAlias, help="""Manages credentials in a database to access service resources.""")
38
+ @cli_util.help_option_group
39
+ def database_tools_identity_group():
40
+ pass
41
+
42
+
37
43
  @click.command(cli_util.override('dbtools.work_request_error_group.command_name', 'work-request-error'), cls=CommandGroupWithAlias, help="""An error encountered while executing a work request.""")
38
44
  @cli_util.help_option_group
39
45
  def work_request_error_group():
@@ -52,7 +58,7 @@ def work_request_group():
52
58
  pass
53
59
 
54
60
 
55
- @click.command(cli_util.override('dbtools.database_tools_connection_group.command_name', 'database-tools-connection'), cls=CommandGroupWithAlias, help="""Description of the Database Tools connection.""")
61
+ @click.command(cli_util.override('dbtools.database_tools_connection_group.command_name', 'database-tools-connection'), cls=CommandGroupWithAlias, help="""Provides connectivity details required to establish a connection to a database.""")
56
62
  @cli_util.help_option_group
57
63
  def database_tools_connection_group():
58
64
  pass
@@ -60,6 +66,7 @@ def database_tools_connection_group():
60
66
 
61
67
  dbtools_root_group.add_command(database_tools_endpoint_service_group)
62
68
  dbtools_root_group.add_command(database_tools_private_endpoint_group)
69
+ dbtools_root_group.add_command(database_tools_identity_group)
63
70
  dbtools_root_group.add_command(work_request_error_group)
64
71
  dbtools_root_group.add_command(work_request_log_entry_group)
65
72
  dbtools_root_group.add_command(work_request_group)
@@ -135,6 +142,75 @@ def add_database_tools_connection_lock(ctx, from_json, wait_for_state, max_wait_
135
142
  cli_util.render_response(result, ctx)
136
143
 
137
144
 
145
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.add_database_tools_identity_lock.command_name', 'add'), help=u"""Adds a lock to a DatabaseToolsIdentity resource. \n[Command Reference](addDatabaseToolsIdentityLock)""")
146
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
147
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Type of the lock.""")
148
+ @cli_util.option('--related-resource-id', help=u"""The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.""")
149
+ @cli_util.option('--message', help=u"""A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.""")
150
+ @cli_util.option('--time-created', type=custom_types.CLI_DATETIME, help=u"""When the lock was created.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
151
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
152
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
153
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
154
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
155
+ @json_skeleton_utils.get_cli_json_input_option({})
156
+ @cli_util.help_option
157
+ @click.pass_context
158
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsIdentity'})
159
+ @cli_util.wrap_exceptions
160
+ def add_database_tools_identity_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_identity_id, type, related_resource_id, message, time_created, if_match):
161
+
162
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
163
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
164
+
165
+ kwargs = {}
166
+ if if_match is not None:
167
+ kwargs['if_match'] = if_match
168
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
169
+
170
+ _details = {}
171
+ _details['type'] = type
172
+
173
+ if related_resource_id is not None:
174
+ _details['relatedResourceId'] = related_resource_id
175
+
176
+ if message is not None:
177
+ _details['message'] = message
178
+
179
+ if time_created is not None:
180
+ _details['timeCreated'] = time_created
181
+
182
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
183
+ result = client.add_database_tools_identity_lock(
184
+ database_tools_identity_id=database_tools_identity_id,
185
+ add_resource_lock_details=_details,
186
+ **kwargs
187
+ )
188
+ if wait_for_state:
189
+
190
+ if hasattr(client, 'get_database_tools_identity') and callable(getattr(client, 'get_database_tools_identity')):
191
+ try:
192
+ wait_period_kwargs = {}
193
+ if max_wait_seconds is not None:
194
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
195
+ if wait_interval_seconds is not None:
196
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
197
+
198
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
199
+ result = oci.wait_until(client, client.get_database_tools_identity(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
200
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
201
+ # If we fail, we should show an error, but we should still provide the information to the customer
202
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
203
+ cli_util.render_response(result, ctx)
204
+ sys.exit(2)
205
+ except Exception:
206
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
207
+ cli_util.render_response(result, ctx)
208
+ raise
209
+ else:
210
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
211
+ cli_util.render_response(result, ctx)
212
+
213
+
138
214
  @database_tools_private_endpoint_group.command(name=cli_util.override('dbtools.add_database_tools_private_endpoint_lock.command_name', 'add'), help=u"""Adds a lock to a DatabaseToolsPrivateEndpoint resource. \n[Command Reference](addDatabaseToolsPrivateEndpointLock)""")
139
215
  @cli_util.option('--database-tools-private-endpoint-id', required=True, help=u"""The [OCID] of a Database Tools private endpoint.""")
140
216
  @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Type of the lock.""")
@@ -206,10 +282,10 @@ def add_database_tools_private_endpoint_lock(ctx, from_json, wait_for_state, max
206
282
 
207
283
  @database_tools_connection_group.command(name=cli_util.override('dbtools.change_database_tools_connection_compartment.command_name', 'change-compartment'), help=u"""Moves the specified Database Tools connection to a different compartment in the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeDatabaseToolsConnectionCompartment)""")
208
284
  @cli_util.option('--database-tools-connection-id', required=True, help=u"""The [OCID] of a Database Tools connection.""")
209
- @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to move the `DatabaseToolsConnection` to.""")
285
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to move the Database Tools connection to.""")
210
286
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
211
287
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
212
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
288
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
213
289
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
214
290
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
215
291
  @json_skeleton_utils.get_cli_json_input_option({})
@@ -268,12 +344,76 @@ def change_database_tools_connection_compartment(ctx, from_json, wait_for_state,
268
344
  cli_util.render_response(result, ctx)
269
345
 
270
346
 
347
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.change_database_tools_identity_compartment.command_name', 'change-compartment'), help=u"""Moves the specified Database Tools identity to a different compartment in the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeDatabaseToolsIdentityCompartment)""")
348
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
349
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to move the Database Tools identity to.""")
350
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
351
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
352
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
353
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
354
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
355
+ @json_skeleton_utils.get_cli_json_input_option({})
356
+ @cli_util.help_option
357
+ @click.pass_context
358
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
359
+ @cli_util.wrap_exceptions
360
+ def change_database_tools_identity_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_identity_id, compartment_id, if_match, is_lock_override):
361
+
362
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
363
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
364
+
365
+ kwargs = {}
366
+ if if_match is not None:
367
+ kwargs['if_match'] = if_match
368
+ if is_lock_override is not None:
369
+ kwargs['is_lock_override'] = is_lock_override
370
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
371
+
372
+ _details = {}
373
+ _details['compartmentId'] = compartment_id
374
+
375
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
376
+ result = client.change_database_tools_identity_compartment(
377
+ database_tools_identity_id=database_tools_identity_id,
378
+ change_database_tools_identity_compartment_details=_details,
379
+ **kwargs
380
+ )
381
+ if wait_for_state:
382
+
383
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
384
+ try:
385
+ wait_period_kwargs = {}
386
+ if max_wait_seconds is not None:
387
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
388
+ if wait_interval_seconds is not None:
389
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
390
+ if 'opc-work-request-id' not in result.headers:
391
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
392
+ cli_util.render_response(result, ctx)
393
+ return
394
+
395
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
396
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
397
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
398
+ # If we fail, we should show an error, but we should still provide the information to the customer
399
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
400
+ cli_util.render_response(result, ctx)
401
+ sys.exit(2)
402
+ except Exception:
403
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
404
+ cli_util.render_response(result, ctx)
405
+ raise
406
+ else:
407
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
408
+ cli_util.render_response(result, ctx)
409
+
410
+
271
411
  @database_tools_private_endpoint_group.command(name=cli_util.override('dbtools.change_database_tools_private_endpoint_compartment.command_name', 'change-compartment'), help=u"""Moves a Database Tools private endpoint into a different compartment in the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeDatabaseToolsPrivateEndpointCompartment)""")
272
412
  @cli_util.option('--database-tools-private-endpoint-id', required=True, help=u"""The [OCID] of a Database Tools private endpoint.""")
273
413
  @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to move the `DatabaseConnectionProfile` to.""")
274
414
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
275
415
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
276
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
416
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
277
417
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
278
418
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
279
419
  @json_skeleton_utils.get_cli_json_input_option({})
@@ -335,14 +475,15 @@ def change_database_tools_private_endpoint_compartment(ctx, from_json, wait_for_
335
475
  @database_tools_connection_group.command(name=cli_util.override('dbtools.create_database_tools_connection.command_name', 'create'), help=u"""Creates a new Database Tools connection. \n[Command Reference](createDatabaseToolsConnection)""")
336
476
  @cli_util.option('--display-name', required=True, help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
337
477
  @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the Database Tools connection.""")
338
- @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE", "MYSQL", "POSTGRESQL", "GENERIC_JDBC"]), help=u"""The DatabaseToolsConnection type.""")
478
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE", "MYSQL", "POSTGRESQL", "GENERIC_JDBC"]), help=u"""The Database Tools connection type.""")
339
479
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
340
480
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
341
481
  @cli_util.option('--locks', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Locks associated with this resource.
342
482
 
343
483
  This option is a JSON list with items of type ResourceLock. For documentation on ResourceLock please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/ResourceLock.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
344
484
  @cli_util.option('--runtime-support', type=custom_types.CliCaseInsensitiveChoice(["SUPPORTED", "UNSUPPORTED"]), help=u"""Specifies whether this connection is supported by the Database Tools Runtime.""")
345
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
485
+ @cli_util.option('--runtime-identity', type=custom_types.CliCaseInsensitiveChoice(["AUTHENTICATED_PRINCIPAL", "RESOURCE_PRINCIPAL"]), help=u"""Specifies the identity used by the Database Tools service to issue requests to other OCI services (e.g., Secrets in Vault).""")
486
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
346
487
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
347
488
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
348
489
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}})
@@ -350,7 +491,7 @@ This option is a JSON list with items of type ResourceLock. For documentation o
350
491
  @click.pass_context
351
492
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsConnection'})
352
493
  @cli_util.wrap_exceptions
353
- def create_database_tools_connection(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, type, defined_tags, freeform_tags, locks, runtime_support):
494
+ def create_database_tools_connection(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, type, defined_tags, freeform_tags, locks, runtime_support, runtime_identity):
354
495
 
355
496
  kwargs = {}
356
497
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -372,6 +513,9 @@ def create_database_tools_connection(ctx, from_json, wait_for_state, max_wait_se
372
513
  if runtime_support is not None:
373
514
  _details['runtimeSupport'] = runtime_support
374
515
 
516
+ if runtime_identity is not None:
517
+ _details['runtimeIdentity'] = runtime_identity
518
+
375
519
  client = cli_util.build_client('database_tools', 'database_tools', ctx)
376
520
  result = client.create_database_tools_connection(
377
521
  create_database_tools_connection_details=_details,
@@ -411,7 +555,7 @@ def create_database_tools_connection(ctx, from_json, wait_for_state, max_wait_se
411
555
  @cli_util.option('--display-name', required=True, help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
412
556
  @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the Database Tools connection.""")
413
557
  @cli_util.option('--url', required=True, help=u"""The JDBC URL used to connect to the Generic JDBC database system.""")
414
- @cli_util.option('--user-name', required=True, help=u"""The user name.""")
558
+ @cli_util.option('--user-name', required=True, help=u"""The database user name.""")
415
559
  @cli_util.option('--user-password', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
416
560
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
417
561
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -419,11 +563,12 @@ def create_database_tools_connection(ctx, from_json, wait_for_state, max_wait_se
419
563
 
420
564
  This option is a JSON list with items of type ResourceLock. For documentation on ResourceLock please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/ResourceLock.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
421
565
  @cli_util.option('--runtime-support', type=custom_types.CliCaseInsensitiveChoice(["SUPPORTED", "UNSUPPORTED"]), help=u"""Specifies whether this connection is supported by the Database Tools Runtime.""")
566
+ @cli_util.option('--runtime-identity', type=custom_types.CliCaseInsensitiveChoice(["AUTHENTICATED_PRINCIPAL", "RESOURCE_PRINCIPAL"]), help=u"""Specifies the identity used by the Database Tools service to issue requests to other OCI services (e.g., Secrets in Vault).""")
422
567
  @cli_util.option('--advanced-properties', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The advanced connection properties key-value pair.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
423
568
  @cli_util.option('--key-stores', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The CA certificate to verify the server's certificate and the client private key and associated certificate required for client authentication.
424
569
 
425
570
  This option is a JSON list with items of type DatabaseToolsKeyStoreGenericJdbcDetails. For documentation on DatabaseToolsKeyStoreGenericJdbcDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/DatabaseToolsKeyStoreGenericJdbcDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
426
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
571
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
427
572
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
428
573
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
429
574
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStoreGenericJdbcDetails]'}})
@@ -431,7 +576,7 @@ This option is a JSON list with items of type DatabaseToolsKeyStoreGenericJdbcDe
431
576
  @click.pass_context
432
577
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStoreGenericJdbcDetails]'}}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsConnection'})
433
578
  @cli_util.wrap_exceptions
434
- def create_database_tools_connection_create_database_tools_connection_generic_jdbc_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, url, user_name, user_password, defined_tags, freeform_tags, locks, runtime_support, advanced_properties, key_stores):
579
+ def create_database_tools_connection_create_database_tools_connection_generic_jdbc_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, url, user_name, user_password, defined_tags, freeform_tags, locks, runtime_support, runtime_identity, advanced_properties, key_stores):
435
580
 
436
581
  kwargs = {}
437
582
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -455,6 +600,9 @@ def create_database_tools_connection_create_database_tools_connection_generic_jd
455
600
  if runtime_support is not None:
456
601
  _details['runtimeSupport'] = runtime_support
457
602
 
603
+ if runtime_identity is not None:
604
+ _details['runtimeIdentity'] = runtime_identity
605
+
458
606
  if advanced_properties is not None:
459
607
  _details['advancedProperties'] = cli_util.parse_json_parameter("advanced_properties", advanced_properties)
460
608
 
@@ -502,7 +650,7 @@ def create_database_tools_connection_create_database_tools_connection_generic_jd
502
650
  @cli_util.option('--display-name', required=True, help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
503
651
  @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the Database Tools connection.""")
504
652
  @cli_util.option('--connection-string', required=True, help=u"""The connection string used to connect to the PostgreSQL Server.""")
505
- @cli_util.option('--user-name', required=True, help=u"""The user name.""")
653
+ @cli_util.option('--user-name', required=True, help=u"""The database user name.""")
506
654
  @cli_util.option('--user-password', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
507
655
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
508
656
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -510,13 +658,14 @@ def create_database_tools_connection_create_database_tools_connection_generic_jd
510
658
 
511
659
  This option is a JSON list with items of type ResourceLock. For documentation on ResourceLock please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/ResourceLock.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
512
660
  @cli_util.option('--runtime-support', type=custom_types.CliCaseInsensitiveChoice(["SUPPORTED", "UNSUPPORTED"]), help=u"""Specifies whether this connection is supported by the Database Tools Runtime.""")
661
+ @cli_util.option('--runtime-identity', type=custom_types.CliCaseInsensitiveChoice(["AUTHENTICATED_PRINCIPAL", "RESOURCE_PRINCIPAL"]), help=u"""Specifies the identity used by the Database Tools service to issue requests to other OCI services (e.g., Secrets in Vault).""")
513
662
  @cli_util.option('--related-resource', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
514
663
  @cli_util.option('--advanced-properties', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The advanced connection properties key-value pair (e.g., `sslMode`).""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
515
664
  @cli_util.option('--key-stores', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The CA certificate to verify the server's certificate and the client private key and associated certificate required for client authentication.
516
665
 
517
666
  This option is a JSON list with items of type DatabaseToolsKeyStorePostgresqlDetails. For documentation on DatabaseToolsKeyStorePostgresqlDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/DatabaseToolsKeyStorePostgresqlDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
518
667
  @cli_util.option('--private-endpoint-id', help=u"""The [OCID] of the Database Tools private endpoint used to access the database in the customer VCN.""")
519
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
668
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
520
669
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
521
670
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
522
671
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}, 'related-resource': {'module': 'database_tools', 'class': 'CreateDatabaseToolsRelatedResourcePostgresqlDetails'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStorePostgresqlDetails]'}})
@@ -524,7 +673,7 @@ This option is a JSON list with items of type DatabaseToolsKeyStorePostgresqlDet
524
673
  @click.pass_context
525
674
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}, 'related-resource': {'module': 'database_tools', 'class': 'CreateDatabaseToolsRelatedResourcePostgresqlDetails'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStorePostgresqlDetails]'}}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsConnection'})
526
675
  @cli_util.wrap_exceptions
527
- def create_database_tools_connection_create_database_tools_connection_postgresql_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, connection_string, user_name, user_password, defined_tags, freeform_tags, locks, runtime_support, related_resource, advanced_properties, key_stores, private_endpoint_id):
676
+ def create_database_tools_connection_create_database_tools_connection_postgresql_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, connection_string, user_name, user_password, defined_tags, freeform_tags, locks, runtime_support, runtime_identity, related_resource, advanced_properties, key_stores, private_endpoint_id):
528
677
 
529
678
  kwargs = {}
530
679
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -548,6 +697,9 @@ def create_database_tools_connection_create_database_tools_connection_postgresql
548
697
  if runtime_support is not None:
549
698
  _details['runtimeSupport'] = runtime_support
550
699
 
700
+ if runtime_identity is not None:
701
+ _details['runtimeIdentity'] = runtime_identity
702
+
551
703
  if related_resource is not None:
552
704
  _details['relatedResource'] = cli_util.parse_json_parameter("related_resource", related_resource)
553
705
 
@@ -601,7 +753,7 @@ def create_database_tools_connection_create_database_tools_connection_postgresql
601
753
  @cli_util.option('--display-name', required=True, help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
602
754
  @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the Database Tools connection.""")
603
755
  @cli_util.option('--connection-string', required=True, help=u"""The connection string used to connect to the MySQL Server.""")
604
- @cli_util.option('--user-name', required=True, help=u"""The user name.""")
756
+ @cli_util.option('--user-name', required=True, help=u"""The database user name.""")
605
757
  @cli_util.option('--user-password', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
606
758
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
607
759
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -609,13 +761,14 @@ def create_database_tools_connection_create_database_tools_connection_postgresql
609
761
 
610
762
  This option is a JSON list with items of type ResourceLock. For documentation on ResourceLock please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/ResourceLock.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
611
763
  @cli_util.option('--runtime-support', type=custom_types.CliCaseInsensitiveChoice(["SUPPORTED", "UNSUPPORTED"]), help=u"""Specifies whether this connection is supported by the Database Tools Runtime.""")
764
+ @cli_util.option('--runtime-identity', type=custom_types.CliCaseInsensitiveChoice(["AUTHENTICATED_PRINCIPAL", "RESOURCE_PRINCIPAL"]), help=u"""Specifies the identity used by the Database Tools service to issue requests to other OCI services (e.g., Secrets in Vault).""")
612
765
  @cli_util.option('--related-resource', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
613
766
  @cli_util.option('--advanced-properties', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The advanced connection properties key-value pair (e.g., `sslMode`).""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
614
767
  @cli_util.option('--key-stores', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The CA certificate to verify the server's certificate and the client private key and associated certificate required for client authentication.
615
768
 
616
769
  This option is a JSON list with items of type DatabaseToolsKeyStoreMySqlDetails. For documentation on DatabaseToolsKeyStoreMySqlDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/DatabaseToolsKeyStoreMySqlDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
617
770
  @cli_util.option('--private-endpoint-id', help=u"""The [OCID] of the Database Tools private endpoint used to access the database in the customer VCN.""")
618
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
771
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
619
772
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
620
773
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
621
774
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}, 'related-resource': {'module': 'database_tools', 'class': 'CreateDatabaseToolsRelatedResourceMySqlDetails'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStoreMySqlDetails]'}})
@@ -623,7 +776,7 @@ This option is a JSON list with items of type DatabaseToolsKeyStoreMySqlDetails.
623
776
  @click.pass_context
624
777
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}, 'related-resource': {'module': 'database_tools', 'class': 'CreateDatabaseToolsRelatedResourceMySqlDetails'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStoreMySqlDetails]'}}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsConnection'})
625
778
  @cli_util.wrap_exceptions
626
- def create_database_tools_connection_create_database_tools_connection_my_sql_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, connection_string, user_name, user_password, defined_tags, freeform_tags, locks, runtime_support, related_resource, advanced_properties, key_stores, private_endpoint_id):
779
+ def create_database_tools_connection_create_database_tools_connection_my_sql_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, connection_string, user_name, user_password, defined_tags, freeform_tags, locks, runtime_support, runtime_identity, related_resource, advanced_properties, key_stores, private_endpoint_id):
627
780
 
628
781
  kwargs = {}
629
782
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -647,6 +800,9 @@ def create_database_tools_connection_create_database_tools_connection_my_sql_det
647
800
  if runtime_support is not None:
648
801
  _details['runtimeSupport'] = runtime_support
649
802
 
803
+ if runtime_identity is not None:
804
+ _details['runtimeIdentity'] = runtime_identity
805
+
650
806
  if related_resource is not None:
651
807
  _details['relatedResource'] = cli_util.parse_json_parameter("related_resource", related_resource)
652
808
 
@@ -708,6 +864,7 @@ def create_database_tools_connection_create_database_tools_connection_my_sql_det
708
864
 
709
865
  This option is a JSON list with items of type ResourceLock. For documentation on ResourceLock please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/ResourceLock.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
710
866
  @cli_util.option('--runtime-support', type=custom_types.CliCaseInsensitiveChoice(["SUPPORTED", "UNSUPPORTED"]), help=u"""Specifies whether this connection is supported by the Database Tools Runtime.""")
867
+ @cli_util.option('--runtime-identity', type=custom_types.CliCaseInsensitiveChoice(["AUTHENTICATED_PRINCIPAL", "RESOURCE_PRINCIPAL"]), help=u"""Specifies the identity used by the Database Tools service to issue requests to other OCI services (e.g., Secrets in Vault).""")
711
868
  @cli_util.option('--related-resource', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
712
869
  @cli_util.option('--advanced-properties', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The advanced connection properties key-value pair (e.g., `oracle.net.ssl_server_dn_match`).""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
713
870
  @cli_util.option('--key-stores', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Oracle wallet or Java Keystores containing trusted certificates for authenticating the server's public certificate and the client private key and associated certificates required for client authentication.
@@ -715,7 +872,7 @@ This option is a JSON list with items of type ResourceLock. For documentation o
715
872
  This option is a JSON list with items of type DatabaseToolsKeyStoreDetails. For documentation on DatabaseToolsKeyStoreDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/DatabaseToolsKeyStoreDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
716
873
  @cli_util.option('--private-endpoint-id', help=u"""The [OCID] of the Database Tools private endpoint used to access the database in the customer VCN.""")
717
874
  @cli_util.option('--proxy-client', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
718
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
875
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
719
876
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
720
877
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
721
878
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}, 'related-resource': {'module': 'database_tools', 'class': 'CreateDatabaseToolsRelatedResourceDetails'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStoreDetails]'}, 'proxy-client': {'module': 'database_tools', 'class': 'DatabaseToolsConnectionOracleDatabaseProxyClientDetails'}})
@@ -723,7 +880,7 @@ This option is a JSON list with items of type DatabaseToolsKeyStoreDetails. For
723
880
  @click.pass_context
724
881
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}, 'related-resource': {'module': 'database_tools', 'class': 'CreateDatabaseToolsRelatedResourceDetails'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStoreDetails]'}, 'proxy-client': {'module': 'database_tools', 'class': 'DatabaseToolsConnectionOracleDatabaseProxyClientDetails'}}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsConnection'})
725
882
  @cli_util.wrap_exceptions
726
- def create_database_tools_connection_create_database_tools_connection_oracle_database_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, connection_string, user_name, user_password, defined_tags, freeform_tags, locks, runtime_support, related_resource, advanced_properties, key_stores, private_endpoint_id, proxy_client):
883
+ def create_database_tools_connection_create_database_tools_connection_oracle_database_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, connection_string, user_name, user_password, defined_tags, freeform_tags, locks, runtime_support, runtime_identity, related_resource, advanced_properties, key_stores, private_endpoint_id, proxy_client):
727
884
 
728
885
  kwargs = {}
729
886
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -747,6 +904,9 @@ def create_database_tools_connection_create_database_tools_connection_oracle_dat
747
904
  if runtime_support is not None:
748
905
  _details['runtimeSupport'] = runtime_support
749
906
 
907
+ if runtime_identity is not None:
908
+ _details['runtimeIdentity'] = runtime_identity
909
+
750
910
  if related_resource is not None:
751
911
  _details['relatedResource'] = cli_util.parse_json_parameter("related_resource", related_resource)
752
912
 
@@ -799,6 +959,154 @@ def create_database_tools_connection_create_database_tools_connection_oracle_dat
799
959
  cli_util.render_response(result, ctx)
800
960
 
801
961
 
962
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.create_database_tools_identity.command_name', 'create'), help=u"""Creates a new Database Tools identity. \n[Command Reference](createDatabaseToolsIdentity)""")
963
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE_RESOURCE_PRINCIPAL"]), help=u"""The Database Tools identity type.""")
964
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the Database Tools identity.""")
965
+ @cli_util.option('--display-name', required=True, help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
966
+ @cli_util.option('--database-tools-connection-id', required=True, help=u"""The [OCID] of the related Database Tools connection.""")
967
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
968
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
969
+ @cli_util.option('--locks', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Locks associated with this resource.
970
+
971
+ This option is a JSON list with items of type ResourceLock. For documentation on ResourceLock please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/ResourceLock.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
972
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
973
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
974
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
975
+ @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}})
976
+ @cli_util.help_option
977
+ @click.pass_context
978
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsIdentity'})
979
+ @cli_util.wrap_exceptions
980
+ def create_database_tools_identity(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, type, compartment_id, display_name, database_tools_connection_id, defined_tags, freeform_tags, locks):
981
+
982
+ kwargs = {}
983
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
984
+
985
+ _details = {}
986
+ _details['type'] = type
987
+ _details['compartmentId'] = compartment_id
988
+ _details['displayName'] = display_name
989
+ _details['databaseToolsConnectionId'] = database_tools_connection_id
990
+
991
+ if defined_tags is not None:
992
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
993
+
994
+ if freeform_tags is not None:
995
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
996
+
997
+ if locks is not None:
998
+ _details['locks'] = cli_util.parse_json_parameter("locks", locks)
999
+
1000
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
1001
+ result = client.create_database_tools_identity(
1002
+ create_database_tools_identity_details=_details,
1003
+ **kwargs
1004
+ )
1005
+ if wait_for_state:
1006
+
1007
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1008
+ try:
1009
+ wait_period_kwargs = {}
1010
+ if max_wait_seconds is not None:
1011
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1012
+ if wait_interval_seconds is not None:
1013
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1014
+ if 'opc-work-request-id' not in result.headers:
1015
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
1016
+ cli_util.render_response(result, ctx)
1017
+ return
1018
+
1019
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1020
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1021
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1022
+ # If we fail, we should show an error, but we should still provide the information to the customer
1023
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
1024
+ cli_util.render_response(result, ctx)
1025
+ sys.exit(2)
1026
+ except Exception:
1027
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1028
+ cli_util.render_response(result, ctx)
1029
+ raise
1030
+ else:
1031
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1032
+ cli_util.render_response(result, ctx)
1033
+
1034
+
1035
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.create_database_tools_identity_create_database_tools_identity_oracle_database_resource_principal_details.command_name', 'create-database-tools-identity-create-database-tools-identity-oracle-database-resource-principal-details'), help=u"""Creates a new Database Tools identity. \n[Command Reference](createDatabaseToolsIdentity)""")
1036
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the Database Tools identity.""")
1037
+ @cli_util.option('--display-name', required=True, help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
1038
+ @cli_util.option('--database-tools-connection-id', required=True, help=u"""The [OCID] of the related Database Tools connection.""")
1039
+ @cli_util.option('--credential-key', required=True, help=u"""The name of the credential object created in the Oracle Database.""")
1040
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1041
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1042
+ @cli_util.option('--locks', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Locks associated with this resource.
1043
+
1044
+ This option is a JSON list with items of type ResourceLock. For documentation on ResourceLock please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/ResourceLock.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1045
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1046
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
1047
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
1048
+ @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}})
1049
+ @cli_util.help_option
1050
+ @click.pass_context
1051
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsIdentity'})
1052
+ @cli_util.wrap_exceptions
1053
+ def create_database_tools_identity_create_database_tools_identity_oracle_database_resource_principal_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, database_tools_connection_id, credential_key, defined_tags, freeform_tags, locks):
1054
+
1055
+ kwargs = {}
1056
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1057
+
1058
+ _details = {}
1059
+ _details['compartmentId'] = compartment_id
1060
+ _details['displayName'] = display_name
1061
+ _details['databaseToolsConnectionId'] = database_tools_connection_id
1062
+ _details['credentialKey'] = credential_key
1063
+
1064
+ if defined_tags is not None:
1065
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
1066
+
1067
+ if freeform_tags is not None:
1068
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
1069
+
1070
+ if locks is not None:
1071
+ _details['locks'] = cli_util.parse_json_parameter("locks", locks)
1072
+
1073
+ _details['type'] = 'ORACLE_DATABASE_RESOURCE_PRINCIPAL'
1074
+
1075
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
1076
+ result = client.create_database_tools_identity(
1077
+ create_database_tools_identity_details=_details,
1078
+ **kwargs
1079
+ )
1080
+ if wait_for_state:
1081
+
1082
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1083
+ try:
1084
+ wait_period_kwargs = {}
1085
+ if max_wait_seconds is not None:
1086
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1087
+ if wait_interval_seconds is not None:
1088
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1089
+ if 'opc-work-request-id' not in result.headers:
1090
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
1091
+ cli_util.render_response(result, ctx)
1092
+ return
1093
+
1094
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1095
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1096
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1097
+ # If we fail, we should show an error, but we should still provide the information to the customer
1098
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
1099
+ cli_util.render_response(result, ctx)
1100
+ sys.exit(2)
1101
+ except Exception:
1102
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1103
+ cli_util.render_response(result, ctx)
1104
+ raise
1105
+ else:
1106
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1107
+ cli_util.render_response(result, ctx)
1108
+
1109
+
802
1110
  @database_tools_private_endpoint_group.command(name=cli_util.override('dbtools.create_database_tools_private_endpoint.command_name', 'create'), help=u"""Creates a new Database Tools private endpoint. \n[Command Reference](createDatabaseToolsPrivateEndpoint)""")
803
1111
  @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment containing the Database Tools private endpoint.""")
804
1112
  @cli_util.option('--display-name', required=True, help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
@@ -812,7 +1120,7 @@ This option is a JSON list with items of type ResourceLock. For documentation o
812
1120
  @cli_util.option('--description', help=u"""A description of the Database Tools private endpoint.""")
813
1121
  @cli_util.option('--private-endpoint-ip', help=u"""The private IP address that represents the access point for the associated endpoint service.""")
814
1122
  @cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The [OCID] of the network security groups that the private endpoint's VNIC belongs to. For more information about NSGs, see [NetworkSecurityGroup].""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
815
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1123
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
816
1124
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
817
1125
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
818
1126
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'locks': {'module': 'database_tools', 'class': 'list[ResourceLock]'}, 'nsg-ids': {'module': 'database_tools', 'class': 'list[string]'}})
@@ -889,7 +1197,7 @@ def create_database_tools_private_endpoint(ctx, from_json, wait_for_state, max_w
889
1197
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
890
1198
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
891
1199
  @cli_util.confirm_delete_option
892
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1200
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
893
1201
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
894
1202
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
895
1203
  @json_skeleton_utils.get_cli_json_input_option({})
@@ -943,12 +1251,12 @@ def delete_database_tools_connection(ctx, from_json, wait_for_state, max_wait_se
943
1251
  cli_util.render_response(result, ctx)
944
1252
 
945
1253
 
946
- @database_tools_private_endpoint_group.command(name=cli_util.override('dbtools.delete_database_tools_private_endpoint.command_name', 'delete'), help=u"""Deletes the specified Database Tools private endpoint. \n[Command Reference](deleteDatabaseToolsPrivateEndpoint)""")
947
- @cli_util.option('--database-tools-private-endpoint-id', required=True, help=u"""The [OCID] of a Database Tools private endpoint.""")
1254
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.delete_database_tools_identity.command_name', 'delete'), help=u"""Deletes the specified Database Tools identity resource. \n[Command Reference](deleteDatabaseToolsIdentity)""")
1255
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
948
1256
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
949
1257
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
950
1258
  @cli_util.confirm_delete_option
951
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1259
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
952
1260
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
953
1261
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
954
1262
  @json_skeleton_utils.get_cli_json_input_option({})
@@ -956,10 +1264,10 @@ def delete_database_tools_connection(ctx, from_json, wait_for_state, max_wait_se
956
1264
  @click.pass_context
957
1265
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
958
1266
  @cli_util.wrap_exceptions
959
- def delete_database_tools_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_private_endpoint_id, if_match, is_lock_override):
1267
+ def delete_database_tools_identity(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_identity_id, if_match, is_lock_override):
960
1268
 
961
- if isinstance(database_tools_private_endpoint_id, six.string_types) and len(database_tools_private_endpoint_id.strip()) == 0:
962
- raise click.UsageError('Parameter --database-tools-private-endpoint-id cannot be whitespace or empty string')
1269
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
1270
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
963
1271
 
964
1272
  kwargs = {}
965
1273
  if if_match is not None:
@@ -968,7 +1276,66 @@ def delete_database_tools_private_endpoint(ctx, from_json, wait_for_state, max_w
968
1276
  kwargs['is_lock_override'] = is_lock_override
969
1277
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
970
1278
  client = cli_util.build_client('database_tools', 'database_tools', ctx)
971
- result = client.delete_database_tools_private_endpoint(
1279
+ result = client.delete_database_tools_identity(
1280
+ database_tools_identity_id=database_tools_identity_id,
1281
+ **kwargs
1282
+ )
1283
+ if wait_for_state:
1284
+
1285
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1286
+ try:
1287
+ wait_period_kwargs = {}
1288
+ if max_wait_seconds is not None:
1289
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1290
+ if wait_interval_seconds is not None:
1291
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1292
+ if 'opc-work-request-id' not in result.headers:
1293
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
1294
+ cli_util.render_response(result, ctx)
1295
+ return
1296
+
1297
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1298
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1299
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1300
+ # If we fail, we should show an error, but we should still provide the information to the customer
1301
+ click.echo('Failed to wait until the work request entered the specified state. Please retrieve the work request to find its current state', file=sys.stderr)
1302
+ cli_util.render_response(result, ctx)
1303
+ sys.exit(2)
1304
+ except Exception:
1305
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1306
+ cli_util.render_response(result, ctx)
1307
+ raise
1308
+ else:
1309
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1310
+ cli_util.render_response(result, ctx)
1311
+
1312
+
1313
+ @database_tools_private_endpoint_group.command(name=cli_util.override('dbtools.delete_database_tools_private_endpoint.command_name', 'delete'), help=u"""Deletes the specified Database Tools private endpoint. \n[Command Reference](deleteDatabaseToolsPrivateEndpoint)""")
1314
+ @cli_util.option('--database-tools-private-endpoint-id', required=True, help=u"""The [OCID] of a Database Tools private endpoint.""")
1315
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1316
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
1317
+ @cli_util.confirm_delete_option
1318
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1319
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
1320
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
1321
+ @json_skeleton_utils.get_cli_json_input_option({})
1322
+ @cli_util.help_option
1323
+ @click.pass_context
1324
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1325
+ @cli_util.wrap_exceptions
1326
+ def delete_database_tools_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_private_endpoint_id, if_match, is_lock_override):
1327
+
1328
+ if isinstance(database_tools_private_endpoint_id, six.string_types) and len(database_tools_private_endpoint_id.strip()) == 0:
1329
+ raise click.UsageError('Parameter --database-tools-private-endpoint-id cannot be whitespace or empty string')
1330
+
1331
+ kwargs = {}
1332
+ if if_match is not None:
1333
+ kwargs['if_match'] = if_match
1334
+ if is_lock_override is not None:
1335
+ kwargs['is_lock_override'] = is_lock_override
1336
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1337
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
1338
+ result = client.delete_database_tools_private_endpoint(
972
1339
  database_tools_private_endpoint_id=database_tools_private_endpoint_id,
973
1340
  **kwargs
974
1341
  )
@@ -1046,6 +1413,28 @@ def get_database_tools_endpoint_service(ctx, from_json, database_tools_endpoint_
1046
1413
  cli_util.render_response(result, ctx)
1047
1414
 
1048
1415
 
1416
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.get_database_tools_identity.command_name', 'get'), help=u"""Gets details of the specified Database Tools identity. \n[Command Reference](getDatabaseToolsIdentity)""")
1417
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
1418
+ @json_skeleton_utils.get_cli_json_input_option({})
1419
+ @cli_util.help_option
1420
+ @click.pass_context
1421
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsIdentity'})
1422
+ @cli_util.wrap_exceptions
1423
+ def get_database_tools_identity(ctx, from_json, database_tools_identity_id):
1424
+
1425
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
1426
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
1427
+
1428
+ kwargs = {}
1429
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1430
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
1431
+ result = client.get_database_tools_identity(
1432
+ database_tools_identity_id=database_tools_identity_id,
1433
+ **kwargs
1434
+ )
1435
+ cli_util.render_response(result, ctx)
1436
+
1437
+
1049
1438
  @database_tools_private_endpoint_group.command(name=cli_util.override('dbtools.get_database_tools_private_endpoint.command_name', 'get'), help=u"""Gets details of a specified Database Tools private endpoint. \n[Command Reference](getDatabaseToolsPrivateEndpoint)""")
1050
1439
  @cli_util.option('--database-tools-private-endpoint-id', required=True, help=u"""The [OCID] of a Database Tools private endpoint.""")
1051
1440
  @json_skeleton_utils.get_cli_json_input_option({})
@@ -1069,7 +1458,7 @@ def get_database_tools_private_endpoint(ctx, from_json, database_tools_private_e
1069
1458
 
1070
1459
 
1071
1460
  @work_request_group.command(name=cli_util.override('dbtools.get_work_request.command_name', 'get'), help=u"""Gets the status of the specified work request. \n[Command Reference](getWorkRequest)""")
1072
- @cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
1461
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous request.""")
1073
1462
  @json_skeleton_utils.get_cli_json_input_option({})
1074
1463
  @cli_util.help_option
1075
1464
  @click.pass_context
@@ -1091,12 +1480,13 @@ def get_work_request(ctx, from_json, work_request_id):
1091
1480
 
1092
1481
 
1093
1482
  @database_tools_connection_group.command(name=cli_util.override('dbtools.list_database_tools_connections.command_name', 'list'), help=u"""Returns a list of Database Tools connections. \n[Command Reference](listDatabaseToolsConnections)""")
1094
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
1483
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
1095
1484
  @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE"]), help=u"""A filter to return only resources their `lifecycleState` matches the specified `lifecycleState`.""")
1096
1485
  @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire specified display name.""")
1097
1486
  @cli_util.option('--type', type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE", "MYSQL", "POSTGRESQL", "GENERIC_JDBC"]), multiple=True, help=u"""A filter to return only resources their type matches the specified type.""")
1098
- @cli_util.option('--runtime-support', type=custom_types.CliCaseInsensitiveChoice(["SUPPORTED", "UNSUPPORTED"]), multiple=True, help=u"""A filter to return only resources with one of the specified runtimeSupport values.""")
1099
- @cli_util.option('--related-resource-identifier', help=u"""A filter to return only resources associated to the related resource identifier OCID passed in the query string.""")
1487
+ @cli_util.option('--runtime-support', type=custom_types.CliCaseInsensitiveChoice(["SUPPORTED", "UNSUPPORTED"]), multiple=True, help=u"""A filter to return only resources with one of the specified type values.""")
1488
+ @cli_util.option('--runtime-identity', type=custom_types.CliCaseInsensitiveChoice(["AUTHENTICATED_PRINCIPAL", "RESOURCE_PRINCIPAL"]), multiple=True, help=u"""A filter to return only resources with one of the specified runtimeIdentity values.""")
1489
+ @cli_util.option('--related-resource-identifier', help=u"""The [OCID] of the related resource.""")
1100
1490
  @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
1101
1491
  @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
1102
1492
  @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
@@ -1108,7 +1498,7 @@ def get_work_request(ctx, from_json, work_request_id):
1108
1498
  @click.pass_context
1109
1499
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsConnectionCollection'})
1110
1500
  @cli_util.wrap_exceptions
1111
- def list_database_tools_connections(ctx, from_json, all_pages, page_size, compartment_id, lifecycle_state, display_name, type, runtime_support, related_resource_identifier, limit, page, sort_order, sort_by):
1501
+ def list_database_tools_connections(ctx, from_json, all_pages, page_size, compartment_id, lifecycle_state, display_name, type, runtime_support, runtime_identity, related_resource_identifier, limit, page, sort_order, sort_by):
1112
1502
 
1113
1503
  if all_pages and limit:
1114
1504
  raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
@@ -1122,6 +1512,8 @@ def list_database_tools_connections(ctx, from_json, all_pages, page_size, compar
1122
1512
  kwargs['type'] = type
1123
1513
  if runtime_support is not None and len(runtime_support) > 0:
1124
1514
  kwargs['runtime_support'] = runtime_support
1515
+ if runtime_identity is not None and len(runtime_identity) > 0:
1516
+ kwargs['runtime_identity'] = runtime_identity
1125
1517
  if related_resource_identifier is not None:
1126
1518
  kwargs['related_resource_identifier'] = related_resource_identifier
1127
1519
  if limit is not None:
@@ -1160,7 +1552,7 @@ def list_database_tools_connections(ctx, from_json, all_pages, page_size, compar
1160
1552
 
1161
1553
 
1162
1554
  @database_tools_endpoint_service_group.command(name=cli_util.override('dbtools.list_database_tools_endpoint_services.command_name', 'list'), help=u"""Returns a list of Database Tools endpoint services. \n[Command Reference](listDatabaseToolsEndpointServices)""")
1163
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
1555
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
1164
1556
  @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
1165
1557
  @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
1166
1558
  @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
@@ -1222,8 +1614,74 @@ def list_database_tools_endpoint_services(ctx, from_json, all_pages, page_size,
1222
1614
  cli_util.render_response(result, ctx)
1223
1615
 
1224
1616
 
1617
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.list_database_tools_identities.command_name', 'list'), help=u"""Returns a list of Database Tools identities. \n[Command Reference](listDatabaseToolsIdentities)""")
1618
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
1619
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]), help=u"""A filter to return resources only when their `databaseToolsIdentityLifecycleState` matches the specified `databaseToolsIdentityLifecycleState`.""")
1620
+ @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire specified display name.""")
1621
+ @cli_util.option('--database-tools-connection-id', help=u"""A filter to return only resources when their `databaseToolsConnectionId` matches the specified `databaseToolsConnectionId`.""")
1622
+ @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
1623
+ @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
1624
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
1625
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.""")
1626
+ @cli_util.option('--type', type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE_RESOURCE_PRINCIPAL"]), multiple=True, help=u"""A filter to return only resources with one of the specified type values.""")
1627
+ @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
1628
+ @cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
1629
+ @json_skeleton_utils.get_cli_json_input_option({})
1630
+ @cli_util.help_option
1631
+ @click.pass_context
1632
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsIdentityCollection'})
1633
+ @cli_util.wrap_exceptions
1634
+ def list_database_tools_identities(ctx, from_json, all_pages, page_size, compartment_id, lifecycle_state, display_name, database_tools_connection_id, limit, page, sort_order, sort_by, type):
1635
+
1636
+ if all_pages and limit:
1637
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
1638
+
1639
+ kwargs = {}
1640
+ if lifecycle_state is not None:
1641
+ kwargs['lifecycle_state'] = lifecycle_state
1642
+ if display_name is not None:
1643
+ kwargs['display_name'] = display_name
1644
+ if database_tools_connection_id is not None:
1645
+ kwargs['database_tools_connection_id'] = database_tools_connection_id
1646
+ if limit is not None:
1647
+ kwargs['limit'] = limit
1648
+ if page is not None:
1649
+ kwargs['page'] = page
1650
+ if sort_order is not None:
1651
+ kwargs['sort_order'] = sort_order
1652
+ if sort_by is not None:
1653
+ kwargs['sort_by'] = sort_by
1654
+ if type is not None and len(type) > 0:
1655
+ kwargs['type'] = type
1656
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1657
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
1658
+ if all_pages:
1659
+ if page_size:
1660
+ kwargs['limit'] = page_size
1661
+
1662
+ result = cli_util.list_call_get_all_results(
1663
+ client.list_database_tools_identities,
1664
+ compartment_id=compartment_id,
1665
+ **kwargs
1666
+ )
1667
+ elif limit is not None:
1668
+ result = cli_util.list_call_get_up_to_limit(
1669
+ client.list_database_tools_identities,
1670
+ limit,
1671
+ page_size,
1672
+ compartment_id=compartment_id,
1673
+ **kwargs
1674
+ )
1675
+ else:
1676
+ result = client.list_database_tools_identities(
1677
+ compartment_id=compartment_id,
1678
+ **kwargs
1679
+ )
1680
+ cli_util.render_response(result, ctx)
1681
+
1682
+
1225
1683
  @database_tools_private_endpoint_group.command(name=cli_util.override('dbtools.list_database_tools_private_endpoints.command_name', 'list'), help=u"""Returns a list of Database Tools private endpoints. \n[Command Reference](listDatabaseToolsPrivateEndpoints)""")
1226
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
1684
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
1227
1685
  @cli_util.option('--subnet-id', help=u"""A filter to return only resources their `subnetId` matches the specified `subnetId`.""")
1228
1686
  @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
1229
1687
  @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
@@ -1289,7 +1747,7 @@ def list_database_tools_private_endpoints(ctx, from_json, all_pages, page_size,
1289
1747
 
1290
1748
 
1291
1749
  @work_request_error_group.command(name=cli_util.override('dbtools.list_work_request_errors.command_name', 'list'), help=u"""Returns a paginated list of errors for the specified work request. \n[Command Reference](listWorkRequestErrors)""")
1292
- @cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
1750
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous request.""")
1293
1751
  @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
1294
1752
  @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.""")
1295
1753
  @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
@@ -1346,7 +1804,7 @@ def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_
1346
1804
 
1347
1805
 
1348
1806
  @work_request_log_entry_group.command(name=cli_util.override('dbtools.list_work_request_logs.command_name', 'list-work-request-logs'), help=u"""Returns a paginated list of logs for the specified work request. \n[Command Reference](listWorkRequestLogs)""")
1349
- @cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
1807
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous request.""")
1350
1808
  @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
1351
1809
  @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.""")
1352
1810
  @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
@@ -1403,10 +1861,10 @@ def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id
1403
1861
 
1404
1862
 
1405
1863
  @work_request_group.command(name=cli_util.override('dbtools.list_work_requests.command_name', 'list'), help=u"""Lists the work requests in a compartment. \n[Command Reference](listWorkRequests)""")
1406
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
1864
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
1407
1865
  @cli_util.option('--resource-identifier', help=u"""The [OCID] of the resource.""")
1408
1866
  @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
1409
- @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeAccepted"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. If no value is specified timeAccepted is default.""")
1867
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeAccepted", "timeUpdated"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. If no value is specified timeAccepted is default.""")
1410
1868
  @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
1411
1869
  @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
1412
1870
  @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
@@ -1459,6 +1917,128 @@ def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, res
1459
1917
  cli_util.render_response(result, ctx)
1460
1918
 
1461
1919
 
1920
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.refresh_database_tools_identity_credential.command_name', 'refresh-database-tools-identity-credential'), help=u"""Refresh Database Tools identity credential. \n[Command Reference](refreshDatabaseToolsIdentityCredential)""")
1921
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
1922
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE_RESOURCE_PRINCIPAL"]), help=u"""The Database Tools identity type.""")
1923
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1924
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1925
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
1926
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
1927
+ @json_skeleton_utils.get_cli_json_input_option({})
1928
+ @cli_util.help_option
1929
+ @click.pass_context
1930
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1931
+ @cli_util.wrap_exceptions
1932
+ def refresh_database_tools_identity_credential(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_identity_id, type, if_match):
1933
+
1934
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
1935
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
1936
+
1937
+ kwargs = {}
1938
+ if if_match is not None:
1939
+ kwargs['if_match'] = if_match
1940
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1941
+
1942
+ _details = {}
1943
+ _details['type'] = type
1944
+
1945
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
1946
+ result = client.refresh_database_tools_identity_credential(
1947
+ database_tools_identity_id=database_tools_identity_id,
1948
+ refresh_database_tools_identity_credential_details=_details,
1949
+ **kwargs
1950
+ )
1951
+ if wait_for_state:
1952
+
1953
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1954
+ try:
1955
+ wait_period_kwargs = {}
1956
+ if max_wait_seconds is not None:
1957
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1958
+ if wait_interval_seconds is not None:
1959
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1960
+ if 'opc-work-request-id' not in result.headers:
1961
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
1962
+ cli_util.render_response(result, ctx)
1963
+ return
1964
+
1965
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1966
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1967
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1968
+ # If we fail, we should show an error, but we should still provide the information to the customer
1969
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
1970
+ cli_util.render_response(result, ctx)
1971
+ sys.exit(2)
1972
+ except Exception:
1973
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1974
+ cli_util.render_response(result, ctx)
1975
+ raise
1976
+ else:
1977
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1978
+ cli_util.render_response(result, ctx)
1979
+
1980
+
1981
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.refresh_database_tools_identity_credential_refresh_database_tools_identity_oracle_database_resource_principal_credential_details.command_name', 'refresh-database-tools-identity-credential-refresh-database-tools-identity-oracle-database-resource-principal-credential-details'), help=u"""Refresh Database Tools identity credential. \n[Command Reference](refreshDatabaseToolsIdentityCredential)""")
1982
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
1983
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1984
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1985
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
1986
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
1987
+ @json_skeleton_utils.get_cli_json_input_option({})
1988
+ @cli_util.help_option
1989
+ @click.pass_context
1990
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1991
+ @cli_util.wrap_exceptions
1992
+ def refresh_database_tools_identity_credential_refresh_database_tools_identity_oracle_database_resource_principal_credential_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_identity_id, if_match):
1993
+
1994
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
1995
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
1996
+
1997
+ kwargs = {}
1998
+ if if_match is not None:
1999
+ kwargs['if_match'] = if_match
2000
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2001
+
2002
+ _details = {}
2003
+
2004
+ _details['type'] = 'ORACLE_DATABASE_RESOURCE_PRINCIPAL'
2005
+
2006
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
2007
+ result = client.refresh_database_tools_identity_credential(
2008
+ database_tools_identity_id=database_tools_identity_id,
2009
+ refresh_database_tools_identity_credential_details=_details,
2010
+ **kwargs
2011
+ )
2012
+ if wait_for_state:
2013
+
2014
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
2015
+ try:
2016
+ wait_period_kwargs = {}
2017
+ if max_wait_seconds is not None:
2018
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2019
+ if wait_interval_seconds is not None:
2020
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2021
+ if 'opc-work-request-id' not in result.headers:
2022
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
2023
+ cli_util.render_response(result, ctx)
2024
+ return
2025
+
2026
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
2027
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
2028
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
2029
+ # If we fail, we should show an error, but we should still provide the information to the customer
2030
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
2031
+ cli_util.render_response(result, ctx)
2032
+ sys.exit(2)
2033
+ except Exception:
2034
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
2035
+ cli_util.render_response(result, ctx)
2036
+ raise
2037
+ else:
2038
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
2039
+ cli_util.render_response(result, ctx)
2040
+
2041
+
1462
2042
  @database_tools_connection_group.command(name=cli_util.override('dbtools.remove_database_tools_connection_lock.command_name', 'remove'), help=u"""Removes a lock from a DatabaseToolsConnection resource. \n[Command Reference](removeDatabaseToolsConnectionLock)""")
1463
2043
  @cli_util.option('--database-tools-connection-id', required=True, help=u"""The [OCID] of a Database Tools connection.""")
1464
2044
  @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Type of the lock.""")
@@ -1528,6 +2108,75 @@ def remove_database_tools_connection_lock(ctx, from_json, wait_for_state, max_wa
1528
2108
  cli_util.render_response(result, ctx)
1529
2109
 
1530
2110
 
2111
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.remove_database_tools_identity_lock.command_name', 'remove'), help=u"""Removes a lock from a DatabaseToolsIdentity resource. \n[Command Reference](removeDatabaseToolsIdentityLock)""")
2112
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
2113
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Type of the lock.""")
2114
+ @cli_util.option('--related-resource-id', help=u"""The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.""")
2115
+ @cli_util.option('--message', help=u"""A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.""")
2116
+ @cli_util.option('--time-created', type=custom_types.CLI_DATETIME, help=u"""When the lock was created.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
2117
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
2118
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2119
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
2120
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
2121
+ @json_skeleton_utils.get_cli_json_input_option({})
2122
+ @cli_util.help_option
2123
+ @click.pass_context
2124
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_tools', 'class': 'DatabaseToolsIdentity'})
2125
+ @cli_util.wrap_exceptions
2126
+ def remove_database_tools_identity_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_identity_id, type, related_resource_id, message, time_created, if_match):
2127
+
2128
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
2129
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
2130
+
2131
+ kwargs = {}
2132
+ if if_match is not None:
2133
+ kwargs['if_match'] = if_match
2134
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2135
+
2136
+ _details = {}
2137
+ _details['type'] = type
2138
+
2139
+ if related_resource_id is not None:
2140
+ _details['relatedResourceId'] = related_resource_id
2141
+
2142
+ if message is not None:
2143
+ _details['message'] = message
2144
+
2145
+ if time_created is not None:
2146
+ _details['timeCreated'] = time_created
2147
+
2148
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
2149
+ result = client.remove_database_tools_identity_lock(
2150
+ database_tools_identity_id=database_tools_identity_id,
2151
+ remove_resource_lock_details=_details,
2152
+ **kwargs
2153
+ )
2154
+ if wait_for_state:
2155
+
2156
+ if hasattr(client, 'get_database_tools_identity') and callable(getattr(client, 'get_database_tools_identity')):
2157
+ try:
2158
+ wait_period_kwargs = {}
2159
+ if max_wait_seconds is not None:
2160
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2161
+ if wait_interval_seconds is not None:
2162
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2163
+
2164
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
2165
+ result = oci.wait_until(client, client.get_database_tools_identity(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
2166
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
2167
+ # If we fail, we should show an error, but we should still provide the information to the customer
2168
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
2169
+ cli_util.render_response(result, ctx)
2170
+ sys.exit(2)
2171
+ except Exception:
2172
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
2173
+ cli_util.render_response(result, ctx)
2174
+ raise
2175
+ else:
2176
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
2177
+ cli_util.render_response(result, ctx)
2178
+
2179
+
1531
2180
  @database_tools_private_endpoint_group.command(name=cli_util.override('dbtools.remove_database_tools_private_endpoint_lock.command_name', 'remove'), help=u"""Removes a lock from a DatabaseToolsPrivateEndpoint resource. \n[Command Reference](removeDatabaseToolsPrivateEndpointLock)""")
1532
2181
  @cli_util.option('--database-tools-private-endpoint-id', required=True, help=u"""The [OCID] of a Database Tools private endpoint.""")
1533
2182
  @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Type of the lock.""")
@@ -1599,14 +2248,14 @@ def remove_database_tools_private_endpoint_lock(ctx, from_json, wait_for_state,
1599
2248
 
1600
2249
  @database_tools_connection_group.command(name=cli_util.override('dbtools.update_database_tools_connection.command_name', 'update'), help=u"""Updates the specified Database Tools connection. \n[Command Reference](updateDatabaseToolsConnection)""")
1601
2250
  @cli_util.option('--database-tools-connection-id', required=True, help=u"""The [OCID] of a Database Tools connection.""")
1602
- @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE", "MYSQL", "POSTGRESQL", "GENERIC_JDBC"]), help=u"""The `DatabaseToolsConnection` type.""")
2251
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE", "MYSQL", "POSTGRESQL", "GENERIC_JDBC"]), help=u"""The Database Tools connection type.""")
1603
2252
  @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
1604
2253
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1605
2254
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1606
2255
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1607
2256
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
1608
2257
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
1609
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2258
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1610
2259
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
1611
2260
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
1612
2261
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}})
@@ -1684,7 +2333,7 @@ def update_database_tools_connection(ctx, from_json, force, wait_for_state, max_
1684
2333
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1685
2334
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1686
2335
  @cli_util.option('--url', help=u"""The JDBC URL used to connect to the Generic JDBC database system.""")
1687
- @cli_util.option('--user-name', help=u"""The user name.""")
2336
+ @cli_util.option('--user-name', help=u"""The database user name.""")
1688
2337
  @cli_util.option('--user-password', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1689
2338
  @cli_util.option('--advanced-properties', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The advanced connection properties key-value pair.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1690
2339
  @cli_util.option('--key-stores', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The CA certificate to verify the server's certificate and the client private key and associated certificate required for client authentication.
@@ -1693,7 +2342,7 @@ This option is a JSON list with items of type DatabaseToolsKeyStoreGenericJdbcDe
1693
2342
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1694
2343
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
1695
2344
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
1696
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2345
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1697
2346
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
1698
2347
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
1699
2348
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStoreGenericJdbcDetails]'}})
@@ -1788,17 +2437,17 @@ def update_database_tools_connection_update_database_tools_connection_generic_jd
1788
2437
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1789
2438
  @cli_util.option('--related-resource', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1790
2439
  @cli_util.option('--connection-string', help=u"""The connection string used to connect to the PostgreSQL Server.""")
1791
- @cli_util.option('--user-name', help=u"""The user name.""")
2440
+ @cli_util.option('--user-name', help=u"""The database user name.""")
1792
2441
  @cli_util.option('--user-password', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1793
2442
  @cli_util.option('--advanced-properties', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The advanced connection properties key-value pair (e.g., `sslMode`).""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1794
2443
  @cli_util.option('--key-stores', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The CA certificate to verify the server's certificate and the client private key and associated certificate required for client authentication.
1795
2444
 
1796
2445
  This option is a JSON list with items of type DatabaseToolsKeyStorePostgresqlDetails. For documentation on DatabaseToolsKeyStorePostgresqlDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/DatabaseToolsKeyStorePostgresqlDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1797
- @cli_util.option('--private-endpoint-id', help=u"""The [OCID] of the DatabaseToolsPrivateEndpoint used to access the database in the Customer VCN.""")
2446
+ @cli_util.option('--private-endpoint-id', help=u"""The [OCID] of the Database Tools private endpoint used to access the database in the Customer VCN.""")
1798
2447
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1799
2448
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
1800
2449
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
1801
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2450
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1802
2451
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
1803
2452
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
1804
2453
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'related-resource': {'module': 'database_tools', 'class': 'UpdateDatabaseToolsRelatedResourcePostgresqlDetails'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStorePostgresqlDetails]'}})
@@ -1899,17 +2548,17 @@ def update_database_tools_connection_update_database_tools_connection_postgresql
1899
2548
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1900
2549
  @cli_util.option('--related-resource', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1901
2550
  @cli_util.option('--connection-string', help=u"""The connection string used to connect to the MySQL Server.""")
1902
- @cli_util.option('--user-name', help=u"""The user name.""")
2551
+ @cli_util.option('--user-name', help=u"""The database user name.""")
1903
2552
  @cli_util.option('--user-password', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1904
2553
  @cli_util.option('--advanced-properties', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The advanced connection properties key-value pair (e.g., `sslMode`).""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1905
2554
  @cli_util.option('--key-stores', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The CA certificate to verify the server's certificate and the client private key and associated certificate required for client authentication.
1906
2555
 
1907
2556
  This option is a JSON list with items of type DatabaseToolsKeyStoreMySqlDetails. For documentation on DatabaseToolsKeyStoreMySqlDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/DatabaseToolsKeyStoreMySqlDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1908
- @cli_util.option('--private-endpoint-id', help=u"""The [OCID] of the DatabaseToolsPrivateEndpoint used to access the database in the Customer VCN.""")
2557
+ @cli_util.option('--private-endpoint-id', help=u"""The [OCID] of the Database Tools private endpoint used to access the database in the Customer VCN.""")
1909
2558
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1910
2559
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
1911
2560
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
1912
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2561
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1913
2562
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
1914
2563
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
1915
2564
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'related-resource': {'module': 'database_tools', 'class': 'UpdateDatabaseToolsRelatedResourceMySqlDetails'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStoreMySqlDetails]'}})
@@ -2016,12 +2665,12 @@ def update_database_tools_connection_update_database_tools_connection_my_sql_det
2016
2665
  @cli_util.option('--key-stores', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Oracle wallet or Java Keystores containing trusted certificates for authenticating the server's public certificate and the client private key and associated certificates required for client authentication.
2017
2666
 
2018
2667
  This option is a JSON list with items of type DatabaseToolsKeyStoreDetails. For documentation on DatabaseToolsKeyStoreDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/databasetools/20201005/datatypes/DatabaseToolsKeyStoreDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2019
- @cli_util.option('--private-endpoint-id', help=u"""The [OCID] of the DatabaseToolsPrivateEndpoint used to access the database in the Customer VCN.""")
2668
+ @cli_util.option('--private-endpoint-id', help=u"""The [OCID] of the Database Tools private endpoint used to access the database in the Customer VCN.""")
2020
2669
  @cli_util.option('--proxy-client', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2021
2670
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
2022
2671
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
2023
2672
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2024
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2673
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2025
2674
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
2026
2675
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
2027
2676
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'related-resource': {'module': 'database_tools', 'class': 'UpdateDatabaseToolsRelatedResourceDetails'}, 'user-password': {'module': 'database_tools', 'class': 'DatabaseToolsUserPasswordDetails'}, 'advanced-properties': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'key-stores': {'module': 'database_tools', 'class': 'list[DatabaseToolsKeyStoreDetails]'}, 'proxy-client': {'module': 'database_tools', 'class': 'DatabaseToolsConnectionOracleDatabaseProxyClientDetails'}})
@@ -2118,6 +2767,168 @@ def update_database_tools_connection_update_database_tools_connection_oracle_dat
2118
2767
  cli_util.render_response(result, ctx)
2119
2768
 
2120
2769
 
2770
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.update_database_tools_identity.command_name', 'update'), help=u"""Updates the specified Database Tools identity. \n[Command Reference](updateDatabaseToolsIdentity)""")
2771
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
2772
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE_RESOURCE_PRINCIPAL"]), help=u"""The Database Tools identity type.""")
2773
+ @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
2774
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2775
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2776
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
2777
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
2778
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2779
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2780
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
2781
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
2782
+ @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}})
2783
+ @cli_util.help_option
2784
+ @click.pass_context
2785
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}})
2786
+ @cli_util.wrap_exceptions
2787
+ def update_database_tools_identity(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_identity_id, type, display_name, defined_tags, freeform_tags, if_match, is_lock_override):
2788
+
2789
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
2790
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
2791
+ if not force:
2792
+ if defined_tags or freeform_tags:
2793
+ if not click.confirm("WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
2794
+ ctx.abort()
2795
+
2796
+ kwargs = {}
2797
+ if if_match is not None:
2798
+ kwargs['if_match'] = if_match
2799
+ if is_lock_override is not None:
2800
+ kwargs['is_lock_override'] = is_lock_override
2801
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2802
+
2803
+ _details = {}
2804
+ _details['type'] = type
2805
+
2806
+ if display_name is not None:
2807
+ _details['displayName'] = display_name
2808
+
2809
+ if defined_tags is not None:
2810
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
2811
+
2812
+ if freeform_tags is not None:
2813
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2814
+
2815
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
2816
+ result = client.update_database_tools_identity(
2817
+ database_tools_identity_id=database_tools_identity_id,
2818
+ update_database_tools_identity_details=_details,
2819
+ **kwargs
2820
+ )
2821
+ if wait_for_state:
2822
+
2823
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
2824
+ try:
2825
+ wait_period_kwargs = {}
2826
+ if max_wait_seconds is not None:
2827
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2828
+ if wait_interval_seconds is not None:
2829
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2830
+ if 'opc-work-request-id' not in result.headers:
2831
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
2832
+ cli_util.render_response(result, ctx)
2833
+ return
2834
+
2835
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
2836
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
2837
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
2838
+ # If we fail, we should show an error, but we should still provide the information to the customer
2839
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
2840
+ cli_util.render_response(result, ctx)
2841
+ sys.exit(2)
2842
+ except Exception:
2843
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
2844
+ cli_util.render_response(result, ctx)
2845
+ raise
2846
+ else:
2847
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
2848
+ cli_util.render_response(result, ctx)
2849
+
2850
+
2851
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.update_database_tools_identity_update_database_tools_identity_oracle_database_resource_principal_details.command_name', 'update-database-tools-identity-update-database-tools-identity-oracle-database-resource-principal-details'), help=u"""Updates the specified Database Tools identity. \n[Command Reference](updateDatabaseToolsIdentity)""")
2852
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
2853
+ @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
2854
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2855
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2856
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
2857
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
2858
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2859
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2860
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
2861
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
2862
+ @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}})
2863
+ @cli_util.help_option
2864
+ @click.pass_context
2865
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}})
2866
+ @cli_util.wrap_exceptions
2867
+ def update_database_tools_identity_update_database_tools_identity_oracle_database_resource_principal_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, database_tools_identity_id, display_name, defined_tags, freeform_tags, if_match, is_lock_override):
2868
+
2869
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
2870
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
2871
+ if not force:
2872
+ if defined_tags or freeform_tags:
2873
+ if not click.confirm("WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
2874
+ ctx.abort()
2875
+
2876
+ kwargs = {}
2877
+ if if_match is not None:
2878
+ kwargs['if_match'] = if_match
2879
+ if is_lock_override is not None:
2880
+ kwargs['is_lock_override'] = is_lock_override
2881
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2882
+
2883
+ _details = {}
2884
+
2885
+ if display_name is not None:
2886
+ _details['displayName'] = display_name
2887
+
2888
+ if defined_tags is not None:
2889
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
2890
+
2891
+ if freeform_tags is not None:
2892
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2893
+
2894
+ _details['type'] = 'ORACLE_DATABASE_RESOURCE_PRINCIPAL'
2895
+
2896
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
2897
+ result = client.update_database_tools_identity(
2898
+ database_tools_identity_id=database_tools_identity_id,
2899
+ update_database_tools_identity_details=_details,
2900
+ **kwargs
2901
+ )
2902
+ if wait_for_state:
2903
+
2904
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
2905
+ try:
2906
+ wait_period_kwargs = {}
2907
+ if max_wait_seconds is not None:
2908
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2909
+ if wait_interval_seconds is not None:
2910
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2911
+ if 'opc-work-request-id' not in result.headers:
2912
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
2913
+ cli_util.render_response(result, ctx)
2914
+ return
2915
+
2916
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
2917
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
2918
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
2919
+ # If we fail, we should show an error, but we should still provide the information to the customer
2920
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
2921
+ cli_util.render_response(result, ctx)
2922
+ sys.exit(2)
2923
+ except Exception:
2924
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
2925
+ cli_util.render_response(result, ctx)
2926
+ raise
2927
+ else:
2928
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
2929
+ cli_util.render_response(result, ctx)
2930
+
2931
+
2121
2932
  @database_tools_private_endpoint_group.command(name=cli_util.override('dbtools.update_database_tools_private_endpoint.command_name', 'update'), help=u"""Updates the specified Database Tools private endpoint. \n[Command Reference](updateDatabaseToolsPrivateEndpoint)""")
2122
2933
  @cli_util.option('--database-tools-private-endpoint-id', required=True, help=u"""The [OCID] of a Database Tools private endpoint.""")
2123
2934
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -2128,7 +2939,7 @@ def update_database_tools_connection_update_database_tools_connection_oracle_dat
2128
2939
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
2129
2940
  @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
2130
2941
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2131
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2942
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "WAITING", "NEEDS_ATTENTION"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2132
2943
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
2133
2944
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
2134
2945
  @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database_tools', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database_tools', 'class': 'dict(str, string)'}, 'nsg-ids': {'module': 'database_tools', 'class': 'list[string]'}})
@@ -2207,7 +3018,7 @@ def update_database_tools_private_endpoint(ctx, from_json, force, wait_for_state
2207
3018
 
2208
3019
  @database_tools_connection_group.command(name=cli_util.override('dbtools.validate_database_tools_connection.command_name', 'validate'), help=u"""Validates the Database Tools connection details by establishing a connection to the database. \n[Command Reference](validateDatabaseToolsConnection)""")
2209
3020
  @cli_util.option('--database-tools-connection-id', required=True, help=u"""The [OCID] of a Database Tools connection.""")
2210
- @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE", "MYSQL", "POSTGRESQL", "GENERIC_JDBC"]), help=u"""The `DatabaseToolsConnection` type.""")
3021
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE", "MYSQL", "POSTGRESQL", "GENERIC_JDBC"]), help=u"""The Database Tools connection type.""")
2211
3022
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
2212
3023
  @json_skeleton_utils.get_cli_json_input_option({})
2213
3024
  @cli_util.help_option
@@ -2327,3 +3138,65 @@ def validate_database_tools_connection_validate_database_tools_connection_my_sql
2327
3138
  **kwargs
2328
3139
  )
2329
3140
  cli_util.render_response(result, ctx)
3141
+
3142
+
3143
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.validate_database_tools_identity_credential.command_name', 'validate-database-tools-identity-credential'), help=u"""Validates the Database Tools identity credentials by establishing a connection to the customer database and executing the dbms_cloud.send_request to validate the credential. \n[Command Reference](validateDatabaseToolsIdentityCredential)""")
3144
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
3145
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLE_DATABASE_RESOURCE_PRINCIPAL"]), help=u"""The Database Tools identity type.""")
3146
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
3147
+ @json_skeleton_utils.get_cli_json_input_option({})
3148
+ @cli_util.help_option
3149
+ @click.pass_context
3150
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_tools', 'class': 'ValidateDatabaseToolsIdentityCredentialResult'})
3151
+ @cli_util.wrap_exceptions
3152
+ def validate_database_tools_identity_credential(ctx, from_json, database_tools_identity_id, type, if_match):
3153
+
3154
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
3155
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
3156
+
3157
+ kwargs = {}
3158
+ if if_match is not None:
3159
+ kwargs['if_match'] = if_match
3160
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
3161
+
3162
+ _details = {}
3163
+ _details['type'] = type
3164
+
3165
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
3166
+ result = client.validate_database_tools_identity_credential(
3167
+ database_tools_identity_id=database_tools_identity_id,
3168
+ validate_database_tools_identity_credential_details=_details,
3169
+ **kwargs
3170
+ )
3171
+ cli_util.render_response(result, ctx)
3172
+
3173
+
3174
+ @database_tools_identity_group.command(name=cli_util.override('dbtools.validate_database_tools_identity_credential_validate_database_tools_identity_credential_oracle_database_resource_principal_details.command_name', 'validate-database-tools-identity-credential-validate-database-tools-identity-credential-oracle-database-resource-principal-details'), help=u"""Validates the Database Tools identity credentials by establishing a connection to the customer database and executing the dbms_cloud.send_request to validate the credential. \n[Command Reference](validateDatabaseToolsIdentityCredential)""")
3175
+ @cli_util.option('--database-tools-identity-id', required=True, help=u"""The [OCID] of a Database Tools identity.""")
3176
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
3177
+ @json_skeleton_utils.get_cli_json_input_option({})
3178
+ @cli_util.help_option
3179
+ @click.pass_context
3180
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_tools', 'class': 'ValidateDatabaseToolsIdentityCredentialResult'})
3181
+ @cli_util.wrap_exceptions
3182
+ def validate_database_tools_identity_credential_validate_database_tools_identity_credential_oracle_database_resource_principal_details(ctx, from_json, database_tools_identity_id, if_match):
3183
+
3184
+ if isinstance(database_tools_identity_id, six.string_types) and len(database_tools_identity_id.strip()) == 0:
3185
+ raise click.UsageError('Parameter --database-tools-identity-id cannot be whitespace or empty string')
3186
+
3187
+ kwargs = {}
3188
+ if if_match is not None:
3189
+ kwargs['if_match'] = if_match
3190
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
3191
+
3192
+ _details = {}
3193
+
3194
+ _details['type'] = 'ORACLE_DATABASE_RESOURCE_PRINCIPAL'
3195
+
3196
+ client = cli_util.build_client('database_tools', 'database_tools', ctx)
3197
+ result = client.validate_database_tools_identity_credential(
3198
+ database_tools_identity_id=database_tools_identity_id,
3199
+ validate_database_tools_identity_credential_details=_details,
3200
+ **kwargs
3201
+ )
3202
+ cli_util.render_response(result, ctx)