oci-cli 3.64.1__py3-none-any.whl → 3.65.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 (478) hide show
  1. 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 +2 -2
  2. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database/create.txt +3 -3
  3. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database-backup/list.txt +2 -2
  4. oci_cli/help_text_producer/data_files/text/cmdref/db/data-guard-association/create/with-new-db-system.txt +15 -0
  5. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-from-backup.txt +10 -0
  6. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-standby-database.txt +14 -0
  7. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create.txt +10 -0
  8. oci_cli/help_text_producer/data_files/text/cmdref/db/database/update.txt +11 -0
  9. oci_cli/help_text_producer/data_files/text/cmdref/db/exadb-vm-cluster/create.txt +9 -0
  10. oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/list.txt +21 -0
  11. oci_cli/help_text_producer/data_files/text/cmdref/db/gi-version/list.txt +5 -0
  12. oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-backup.txt +42 -27
  13. oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-database.txt +42 -27
  14. oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-db-system.txt +42 -27
  15. oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch.txt +42 -27
  16. oci_cli/help_text_producer/data_files/text/cmdref/db/system/list-db-system-storage-performances.txt +4 -0
  17. oci_cli/help_text_producer/data_files/text/cmdref/db/system/update.txt +15 -0
  18. oci_cli/help_text_producer/data_files/text/cmdref/db/system-shape/list.txt +5 -0
  19. oci_cli/help_text_producer/data_files/text/cmdref/db/version/list.txt +5 -0
  20. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error/{list.txt → list-errors.txt} +5 -5
  21. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error.txt +1 -1
  22. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log-entry/{list-work-request-logs.txt → list-logs.txt} +5 -5
  23. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log-entry.txt +1 -1
  24. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request.txt +2 -2
  25. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +2 -2
  26. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/deployment/create.txt +12 -0
  27. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/deployment/list.txt +9 -0
  28. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/deployment/update.txt +12 -0
  29. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/mesh/delete.txt → kafka/cluster/change-compartment.txt} +15 -20
  30. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/virtual-service → kafka/cluster}/create.txt +78 -66
  31. oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/project → kafka/cluster}/delete.txt +7 -12
  32. oci_cli/help_text_producer/data_files/text/cmdref/{os-management/managed-instance/install-all-windows-updates.txt → kafka/cluster/disable-superuser.txt} +17 -17
  33. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/mesh/change-compartment.txt → kafka/cluster/enable-superuser.txt} +17 -18
  34. oci_cli/help_text_producer/data_files/text/cmdref/{os-management/erratum → kafka/cluster}/get.txt +6 -6
  35. oci_cli/help_text_producer/data_files/text/cmdref/{dts/export → kafka/cluster}/list.txt +36 -23
  36. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/mesh → kafka/cluster}/update.txt +68 -45
  37. oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/project → kafka/cluster-config}/change-compartment.txt +10 -10
  38. oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/data-asset → kafka/cluster-config}/create.txt +30 -33
  39. oci_cli/help_text_producer/data_files/text/cmdref/{os-management/managed-instance-group → kafka/cluster-config}/delete.txt +7 -10
  40. oci_cli/help_text_producer/data_files/text/cmdref/{os-management/windows-update → kafka/cluster-config}/get.txt +6 -6
  41. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/mesh → kafka/cluster-config}/list.txt +25 -30
  42. oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/data-asset → kafka/cluster-config}/update.txt +40 -30
  43. oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/work-request/cancel.txt → kafka/cluster-config-version/delete.txt} +12 -7
  44. oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/project → kafka/cluster-config-version}/get.txt +11 -8
  45. oci_cli/help_text_producer/data_files/text/cmdref/{dts/job → kafka/cluster-config-version}/list.txt +25 -23
  46. oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster-config-version.txt +18 -0
  47. oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster-config.txt +29 -0
  48. oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster.txt +33 -0
  49. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh → kafka}/work-request/cancel.txt +5 -5
  50. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh → kafka}/work-request/get.txt +5 -5
  51. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh → kafka}/work-request/list.txt +26 -31
  52. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/work-request/list-work-request-errors.txt → kafka/work-request-error/list.txt} +16 -13
  53. oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection → kafka}/work-request-error.txt +2 -1
  54. oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/work-request → kafka/work-request-log-entry}/list-work-request-logs.txt +14 -11
  55. oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection → kafka}/work-request-log-entry.txt +2 -1
  56. oci_cli/help_text_producer/data_files/text/cmdref/kafka/work-request.txt +23 -0
  57. oci_cli/help_text_producer/data_files/text/cmdref/kafka.txt +69 -0
  58. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error/{list.txt → list-errors.txt} +5 -5
  59. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error.txt +1 -1
  60. oci_cli/help_text_producer/data_files/text/cmdref/ocvs.txt +1 -1
  61. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list.txt → list-errors.txt} +5 -5
  62. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
  63. oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +1 -1
  64. oci_cli/help_text_producer/data_files/text/index.txt +2 -8
  65. oci_cli/service_mapping.py +5 -20
  66. oci_cli/version.py +1 -1
  67. {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/METADATA +2 -2
  68. {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/RECORD +85 -470
  69. services/cims/src/oci_cli_incident/cims_cli_extended.py +1 -1
  70. services/database/src/oci_cli_database/database_cli_extended.py +56 -1
  71. services/database/src/oci_cli_database/generated/database_cli.py +159 -61
  72. services/golden_gate/src/oci_cli_golden_gate/generated/goldengate_cli.py +22 -3
  73. services/{ai_anomaly_detection → managed_kafka}/__init__.py +1 -1
  74. services/{ai_anomaly_detection → managed_kafka}/src/__init__.py +1 -1
  75. services/{ai_anomaly_detection/src/oci_cli_anomaly_detection → managed_kafka/src/oci_cli_kafka_cluster}/__init__.py +1 -1
  76. services/{ai_anomaly_detection/src/oci_cli_anomaly_detection → managed_kafka/src/oci_cli_kafka_cluster}/generated/__init__.py +1 -1
  77. services/{os_management/src/oci_cli_os_management → managed_kafka/src/oci_cli_kafka_cluster}/generated/client_mappings.py +6 -6
  78. services/managed_kafka/src/oci_cli_kafka_cluster/generated/kafkacluster_cli.py +1254 -0
  79. services/managed_kafka/src/oci_cli_kafka_cluster/kafkacluster_cli_extended.py +46 -0
  80. services/managed_kafka/tests/__init__.py +4 -0
  81. oci_cli/bin/dts.psm1 +0 -147
  82. oci_cli/bin/os-management.psm1 +0 -140
  83. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/change-compartment.txt +0 -138
  84. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/create-data-source-atp.txt +0 -207
  85. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/create-data-source-influx.txt +0 -198
  86. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/create-data-source-os.txt +0 -174
  87. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/delete.txt +0 -138
  88. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/get.txt +0 -100
  89. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/list.txt +0 -146
  90. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset.txt +0 -30
  91. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/change-compartment.txt +0 -119
  92. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create-detect-anomaly-job-embedded-input-details.txt +0 -144
  93. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create-detect-anomaly-job-inline-input-details.txt +0 -185
  94. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create-detect-anomaly-job-object-list-input-details.txt +0 -173
  95. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create-detect-anomaly-job-object-store-output-details.txt +0 -175
  96. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create.txt +0 -173
  97. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/delete.txt +0 -143
  98. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/get.txt +0 -105
  99. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/update.txt +0 -147
  100. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job-collection/list-detect-anomaly-jobs.txt +0 -155
  101. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job-collection.txt +0 -15
  102. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job.txt +0 -31
  103. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/change-compartment.txt +0 -113
  104. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/create.txt +0 -174
  105. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/delete.txt +0 -140
  106. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/detect-anomalies-embedded.txt +0 -124
  107. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/detect-anomalies-inline.txt +0 -139
  108. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/detect-anomalies.txt +0 -125
  109. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/get.txt +0 -100
  110. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/list.txt +0 -148
  111. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/update.txt +0 -173
  112. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model.txt +0 -30
  113. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/change-compartment.txt +0 -138
  114. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/create.txt +0 -170
  115. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/delete.txt +0 -137
  116. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/get.txt +0 -99
  117. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/list.txt +0 -147
  118. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/update.txt +0 -180
  119. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe.txt +0 -25
  120. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/project/create.txt +0 -152
  121. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/project/list.txt +0 -144
  122. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/project/update.txt +0 -166
  123. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/project.txt +0 -24
  124. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request/get.txt +0 -91
  125. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request/list.txt +0 -114
  126. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request-error/list.txt +0 -110
  127. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request-log-entry/list-work-request-logs.txt +0 -110
  128. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request.txt +0 -18
  129. oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection.txt +0 -125
  130. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/cancel.txt +0 -101
  131. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/delete.txt +0 -105
  132. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/get-passphrase.txt +0 -101
  133. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/list.txt +0 -100
  134. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/never-receive.txt +0 -101
  135. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/request-entitlement.txt +0 -189
  136. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/request-return-label.txt +0 -249
  137. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/request.txt +0 -188
  138. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/setup-notifications.txt +0 -63
  139. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/show-entitlement.txt +0 -113
  140. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/show.txt +0 -101
  141. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/update-minimum-storage-capacity.txt +0 -107
  142. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/update-shipping-address.txt +0 -154
  143. oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance.txt +0 -38
  144. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/change-compartment.txt +0 -106
  145. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/configure-physical-appliance.txt +0 -114
  146. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/create-policy.txt +0 -68
  147. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/create.txt +0 -226
  148. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/delete.txt +0 -132
  149. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/generate-manifest.txt +0 -97
  150. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/get-passphrase.txt +0 -68
  151. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/request-appliance.txt +0 -68
  152. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/request-return-label.txt +0 -245
  153. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/setup-notifications.txt +0 -51
  154. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/show.txt +0 -96
  155. oci_cli/help_text_producer/data_files/text/cmdref/dts/export/update.txt +0 -265
  156. oci_cli/help_text_producer/data_files/text/cmdref/dts/export.txt +0 -38
  157. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/change-compartment.txt +0 -106
  158. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/close.txt +0 -96
  159. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/create.txt +0 -192
  160. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/delete.txt +0 -100
  161. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/detach-devices-details/change-compartment.txt +0 -102
  162. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/detach-devices-details.txt +0 -12
  163. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/setup-notifications.txt +0 -68
  164. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/show.txt +0 -96
  165. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/update.txt +0 -150
  166. oci_cli/help_text_producer/data_files/text/cmdref/dts/job/verify-upload-user-credentials.txt +0 -91
  167. oci_cli/help_text_producer/data_files/text/cmdref/dts/job.txt +0 -34
  168. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/activate.txt +0 -93
  169. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/create.txt +0 -93
  170. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/deactivate.txt +0 -77
  171. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/delete.txt +0 -77
  172. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/get-seal-manifest.txt +0 -81
  173. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/list.txt +0 -67
  174. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/reopen.txt +0 -77
  175. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/seal-status.txt +0 -77
  176. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/seal.txt +0 -75
  177. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/set-export.txt +0 -93
  178. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/show.txt +0 -77
  179. oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset.txt +0 -34
  180. oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/configure-encryption.txt +0 -81
  181. oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/finalize.txt +0 -89
  182. oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/initialize-authentication.txt +0 -106
  183. oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/list.txt +0 -63
  184. oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/show.txt +0 -67
  185. oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/unlock.txt +0 -75
  186. oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/unregister.txt +0 -67
  187. oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance.txt +0 -26
  188. oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/configured.txt +0 -111
  189. oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/copied.txt +0 -105
  190. oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/monitored.txt +0 -102
  191. oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/prepared.txt +0 -104
  192. oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/shipped.txt +0 -106
  193. oci_cli/help_text_producer/data_files/text/cmdref/dts/verify.txt +0 -22
  194. oci_cli/help_text_producer/data_files/text/cmdref/dts.txt +0 -144
  195. oci_cli/help_text_producer/data_files/text/cmdref/os-management/erratum-summary/list-errata.txt +0 -310
  196. oci_cli/help_text_producer/data_files/text/cmdref/os-management/erratum-summary.txt +0 -15
  197. oci_cli/help_text_producer/data_files/text/cmdref/os-management/erratum.txt +0 -14
  198. oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/delete-content.txt +0 -113
  199. oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/get-content.txt +0 -108
  200. oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/get-report.txt +0 -270
  201. oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/list-related-events.txt +0 -307
  202. oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/list.txt +0 -319
  203. oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/update.txt +0 -139
  204. oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/upload-content.txt +0 -110
  205. oci_cli/help_text_producer/data_files/text/cmdref/os-management/event.txt +0 -27
  206. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/attach-child.txt +0 -102
  207. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/attach-parent.txt +0 -104
  208. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/detach-child.txt +0 -101
  209. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/detach-parent.txt +0 -102
  210. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/disable-module-stream.txt +0 -138
  211. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/enable-module-stream.txt +0 -139
  212. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/get.txt +0 -91
  213. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-all-updates.txt +0 -125
  214. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-module-profile.txt +0 -141
  215. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-package.txt +0 -123
  216. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-update.txt +0 -123
  217. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-windows-update.txt +0 -124
  218. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-available-packages.txt +0 -142
  219. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-available-software-sources.txt +0 -141
  220. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-available-updates.txt +0 -141
  221. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-available-windows-updates.txt +0 -150
  222. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-installed-packages.txt +0 -141
  223. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-installed-windows-updates.txt +0 -142
  224. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-managed-instance-errata.txt +0 -141
  225. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-module-profiles.txt +0 -210
  226. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-module-streams.txt +0 -210
  227. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list.txt +0 -144
  228. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/remove-module-profile.txt +0 -142
  229. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/remove-package.txt +0 -123
  230. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/switch-module-stream.txt +0 -138
  231. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/attach.txt +0 -102
  232. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/change-compartment.txt +0 -107
  233. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/create.txt +0 -163
  234. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/detach.txt +0 -99
  235. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/get.txt +0 -94
  236. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/install-all-updates.txt +0 -128
  237. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/list.txt +0 -152
  238. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/update.txt +0 -166
  239. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group.txt +0 -30
  240. oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance.txt +0 -64
  241. oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-profile/get.txt +0 -137
  242. oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-profile/list.txt +0 -189
  243. oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-profile.txt +0 -16
  244. oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-stream/get.txt +0 -132
  245. oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-stream/list.txt +0 -188
  246. oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-stream.txt +0 -16
  247. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/change-compartment.txt +0 -110
  248. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/create.txt +0 -357
  249. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/delete.txt +0 -135
  250. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/get.txt +0 -97
  251. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/list-upcoming.txt +0 -251
  252. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/list.txt +0 -174
  253. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/run-now.txt +0 -106
  254. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/skip-next-execution.txt +0 -106
  255. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/update.txt +0 -323
  256. oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job.txt +0 -30
  257. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/add-packages.txt +0 -111
  258. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/change-compartment.txt +0 -108
  259. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/create.txt +0 -187
  260. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/delete.txt +0 -133
  261. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/get-package.txt +0 -101
  262. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/get.txt +0 -95
  263. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/list-packages.txt +0 -145
  264. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/list.txt +0 -144
  265. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/remove-packages.txt +0 -112
  266. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/search-packages.txt +0 -124
  267. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/update.txt +0 -187
  268. oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source.txt +0 -34
  269. oci_cli/help_text_producer/data_files/text/cmdref/os-management/update-managed-instance-details/update-managed-instance.txt +0 -107
  270. oci_cli/help_text_producer/data_files/text/cmdref/os-management/update-managed-instance-details.txt +0 -14
  271. oci_cli/help_text_producer/data_files/text/cmdref/os-management/windows-update/list.txt +0 -129
  272. oci_cli/help_text_producer/data_files/text/cmdref/os-management/windows-update.txt +0 -16
  273. oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request/get.txt +0 -91
  274. oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request/list-errors.txt +0 -128
  275. oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request/list-logs.txt +0 -128
  276. oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request/list.txt +0 -148
  277. oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request.txt +0 -20
  278. oci_cli/help_text_producer/data_files/text/cmdref/os-management.txt +0 -187
  279. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/change-compartment.txt +0 -143
  280. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/create.txt +0 -187
  281. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/delete.txt +0 -141
  282. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/get.txt +0 -103
  283. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/list.txt +0 -150
  284. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/update.txt +0 -193
  285. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy.txt +0 -25
  286. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/debug/report.txt +0 -60
  287. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/debug.txt +0 -14
  288. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/change-compartment.txt +0 -143
  289. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/create.txt +0 -210
  290. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/delete.txt +0 -141
  291. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/get.txt +0 -103
  292. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/list.txt +0 -150
  293. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/update.txt +0 -215
  294. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/change-compartment.txt +0 -147
  295. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/create.txt +0 -197
  296. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/delete.txt +0 -145
  297. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/get.txt +0 -107
  298. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/list.txt +0 -150
  299. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/update.txt +0 -203
  300. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table.txt +0 -25
  301. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway.txt +0 -26
  302. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/mesh/create.txt +0 -190
  303. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/mesh/get.txt +0 -99
  304. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/mesh.txt +0 -27
  305. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/proxy-details/get.txt +0 -79
  306. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/proxy-details.txt +0 -14
  307. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/change-compartment.txt +0 -143
  308. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/create-virtual-deployment-disabled-service-discovery-configuration.txt +0 -204
  309. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/create-virtual-deployment-dns-service-discovery-configuration.txt +0 -209
  310. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/create.txt +0 -215
  311. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/delete.txt +0 -141
  312. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/get.txt +0 -103
  313. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/list.txt +0 -150
  314. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/update-virtual-deployment-disabled-service-discovery-configuration.txt +0 -204
  315. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/update-virtual-deployment-dns-service-discovery-configuration.txt +0 -209
  316. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/update.txt +0 -215
  317. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment.txt +0 -33
  318. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/change-compartment.txt +0 -141
  319. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/delete.txt +0 -139
  320. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/get.txt +0 -101
  321. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/list.txt +0 -150
  322. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/update.txt +0 -211
  323. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/change-compartment.txt +0 -145
  324. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/create.txt +0 -195
  325. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/delete.txt +0 -143
  326. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/get.txt +0 -105
  327. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/list.txt +0 -150
  328. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/update.txt +0 -201
  329. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table.txt +0 -25
  330. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service.txt +0 -27
  331. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/work-request.txt +0 -22
  332. oci_cli/help_text_producer/data_files/text/cmdref/service-mesh.txt +0 -139
  333. services/ai_anomaly_detection/src/oci_cli_anomaly_detection/anomalydetection_cli_extended.py +0 -234
  334. services/ai_anomaly_detection/src/oci_cli_anomaly_detection/generated/anomalydetection_cli.py +0 -2665
  335. services/ai_anomaly_detection/src/oci_cli_anomaly_detection/generated/client_mappings.py +0 -14
  336. services/ai_anomaly_detection/tests/__init__.py +0 -4
  337. services/dts/__init__.py +0 -4
  338. services/dts/src/__init__.py +0 -4
  339. services/dts/src/oci_cli_appliance_export_job/__init__.py +0 -4
  340. services/dts/src/oci_cli_appliance_export_job/applianceexportjob_cli_extended.py +0 -582
  341. services/dts/src/oci_cli_appliance_export_job/applianceexportjob_constants.py +0 -11
  342. services/dts/src/oci_cli_appliance_export_job/generated/__init__.py +0 -4
  343. services/dts/src/oci_cli_appliance_export_job/generated/applianceexportjob_cli.py +0 -428
  344. services/dts/src/oci_cli_appliance_export_job/generated/client_mappings.py +0 -14
  345. services/dts/src/oci_cli_appliance_export_job/manifest/__init__.py +0 -3
  346. services/dts/src/oci_cli_appliance_export_job/manifest/manifest_constants.py +0 -12
  347. services/dts/src/oci_cli_appliance_export_job/manifest/manifest_iterator.py +0 -86
  348. services/dts/src/oci_cli_appliance_export_job/manifest/manifest_line_item.py +0 -22
  349. services/dts/src/oci_cli_appliance_export_job/manifest/manifest_stats.py +0 -93
  350. services/dts/src/oci_cli_appliance_export_job/manifest/manifest_stats_consumer.py +0 -15
  351. services/dts/src/oci_cli_appliance_export_job/manifest/manifest_writer.py +0 -117
  352. services/dts/src/oci_cli_appliance_export_job/manifest/object_uploader.py +0 -124
  353. services/dts/src/oci_cli_dts/__init__.py +0 -4
  354. services/dts/src/oci_cli_dts/appliance_auth_manager.py +0 -59
  355. services/dts/src/oci_cli_dts/appliance_cert_manager.py +0 -51
  356. services/dts/src/oci_cli_dts/appliance_client_proxy.py +0 -57
  357. services/dts/src/oci_cli_dts/appliance_config.py +0 -34
  358. services/dts/src/oci_cli_dts/appliance_config_manager.py +0 -145
  359. services/dts/src/oci_cli_dts/appliance_config_spec.py +0 -38
  360. services/dts/src/oci_cli_dts/appliance_constants.py +0 -35
  361. services/dts/src/oci_cli_dts/appliance_init_auth.py +0 -81
  362. services/dts/src/oci_cli_dts/appliance_init_auth_spec.py +0 -32
  363. services/dts/src/oci_cli_dts/base_client.py +0 -102
  364. services/dts/src/oci_cli_dts/cli_utils.py +0 -131
  365. services/dts/src/oci_cli_dts/dts_service_cli_extended.py +0 -95
  366. services/dts/src/oci_cli_dts/dts_transform.py +0 -31
  367. services/dts/src/oci_cli_dts/generated/__init__.py +0 -4
  368. services/dts/src/oci_cli_dts/generated/dts_service_cli.py +0 -14
  369. services/dts/src/oci_cli_dts/nfs_dataset_client_proxy.py +0 -85
  370. services/dts/src/oci_cli_dts/nfsdataset_cli_extended.py +0 -371
  371. services/dts/src/oci_cli_dts/physical_appliance_control_plane/__init__.py +0 -3
  372. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/__init__.py +0 -16
  373. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/diagnose_tools_client.py +0 -163
  374. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/diagnose_tools_client_composite_operations.py +0 -24
  375. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/__init__.py +0 -28
  376. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/dataset_seal_status.py +0 -282
  377. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/details.py +0 -66
  378. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/nfs_dataset_info.py +0 -191
  379. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/nfs_dataset_spec.py +0 -93
  380. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/nfs_export_config.py +0 -174
  381. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/nfs_export_details.py +0 -66
  382. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/object_storage_upload_config.py +0 -201
  383. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/passphrase_details.py +0 -66
  384. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/physical_transfer_appliance.py +0 -214
  385. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/nfs_dataset_client.py +0 -835
  386. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/nfs_dataset_client_composite_operations.py +0 -24
  387. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/physical_transfer_appliance_client.py +0 -374
  388. services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/physical_transfer_appliance_client_composite_operations.py +0 -24
  389. services/dts/src/oci_cli_dts/physical_appliance_control_plane/service_endpoints.py +0 -9
  390. services/dts/src/oci_cli_dts/physicalappliance_cli_extended.py +0 -590
  391. services/dts/src/oci_cli_dts/verify_cli_extended.py +0 -494
  392. services/dts/src/oci_cli_shipping_vendors/__init__.py +0 -4
  393. services/dts/src/oci_cli_shipping_vendors/generated/__init__.py +0 -4
  394. services/dts/src/oci_cli_shipping_vendors/generated/client_mappings.py +0 -14
  395. services/dts/src/oci_cli_shipping_vendors/generated/shippingvendors_cli.py +0 -49
  396. services/dts/src/oci_cli_transfer_appliance/__init__.py +0 -4
  397. services/dts/src/oci_cli_transfer_appliance/generated/__init__.py +0 -4
  398. services/dts/src/oci_cli_transfer_appliance/generated/client_mappings.py +0 -14
  399. services/dts/src/oci_cli_transfer_appliance/generated/transferappliance_cli.py +0 -364
  400. services/dts/src/oci_cli_transfer_appliance/transferappliance_cli_extended.py +0 -362
  401. services/dts/src/oci_cli_transfer_appliance_entitlement/__init__.py +0 -4
  402. services/dts/src/oci_cli_transfer_appliance_entitlement/generated/__init__.py +0 -4
  403. services/dts/src/oci_cli_transfer_appliance_entitlement/generated/client_mappings.py +0 -14
  404. services/dts/src/oci_cli_transfer_appliance_entitlement/generated/transferapplianceentitlement_cli.py +0 -155
  405. services/dts/src/oci_cli_transfer_appliance_entitlement/transferapplianceentitlement_cli_extended.py +0 -66
  406. services/dts/src/oci_cli_transfer_device/__init__.py +0 -4
  407. services/dts/src/oci_cli_transfer_device/generated/__init__.py +0 -4
  408. services/dts/src/oci_cli_transfer_device/generated/client_mappings.py +0 -14
  409. services/dts/src/oci_cli_transfer_device/generated/transferdevice_cli.py +0 -209
  410. services/dts/src/oci_cli_transfer_job/__init__.py +0 -4
  411. services/dts/src/oci_cli_transfer_job/generated/__init__.py +0 -4
  412. services/dts/src/oci_cli_transfer_job/generated/client_mappings.py +0 -14
  413. services/dts/src/oci_cli_transfer_job/generated/transferjob_cli.py +0 -368
  414. services/dts/src/oci_cli_transfer_job/transferjob_cli_extended.py +0 -281
  415. services/dts/src/oci_cli_transfer_package/__init__.py +0 -4
  416. services/dts/src/oci_cli_transfer_package/generated/__init__.py +0 -4
  417. services/dts/src/oci_cli_transfer_package/generated/client_mappings.py +0 -14
  418. services/dts/src/oci_cli_transfer_package/generated/transferpackage_cli.py +0 -326
  419. services/dts/tests/__init__.py +0 -4
  420. services/os_management/__init__.py +0 -4
  421. services/os_management/src/__init__.py +0 -4
  422. services/os_management/src/oci_cli_event/__init__.py +0 -4
  423. services/os_management/src/oci_cli_event/event_cli_extended.py +0 -34
  424. services/os_management/src/oci_cli_event/generated/__init__.py +0 -4
  425. services/os_management/src/oci_cli_event/generated/client_mappings.py +0 -14
  426. services/os_management/src/oci_cli_event/generated/event_cli.py +0 -430
  427. services/os_management/src/oci_cli_os_management/__init__.py +0 -4
  428. services/os_management/src/oci_cli_os_management/generated/__init__.py +0 -4
  429. services/os_management/src/oci_cli_os_management/generated/os_management_service_cli.py +0 -15
  430. services/os_management/src/oci_cli_os_management/generated/osmanagement_cli.py +0 -4009
  431. services/os_management/src/oci_cli_os_management/osmanagement_cli_extended.py +0 -244
  432. services/os_management/tests/__init__.py +0 -4
  433. services/service_mesh/__init__.py +0 -4
  434. services/service_mesh/src/__init__.py +0 -4
  435. services/service_mesh/src/oci_cli_service_mesh/__init__.py +0 -4
  436. services/service_mesh/src/oci_cli_service_mesh/generated/__init__.py +0 -4
  437. services/service_mesh/src/oci_cli_service_mesh/generated/client_mappings.py +0 -14
  438. services/service_mesh/src/oci_cli_service_mesh/generated/servicemesh_cli.py +0 -3306
  439. services/service_mesh/src/oci_cli_service_mesh/service_mesh_cli_extended.py +0 -57
  440. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/__init__.py +0 -76
  441. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/aggregators/__init__.py +0 -3
  442. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/aggregators/aggregation_orchestrator.py +0 -88
  443. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/bundle_analyser.py +0 -163
  444. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/event.py +0 -43
  445. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/handlers/__init__.py +0 -3
  446. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/handlers/debug_handler.py +0 -209
  447. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/report_orchestrator.py +0 -82
  448. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/task_orchestrator.py +0 -76
  449. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/task_request.py +0 -232
  450. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/__init__.py +0 -3
  451. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/common_worker.py +0 -116
  452. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/csv_worker.py +0 -39
  453. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/file_worker.py +0 -33
  454. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/igd_worker.py +0 -48
  455. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/mesh_report_worker.py +0 -60
  456. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/mesh_resources_worker.py +0 -49
  457. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/namespaces_worker.py +0 -33
  458. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/oci_cli_version_worker.py +0 -34
  459. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/pod_worker.py +0 -112
  460. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/resource_worker.py +0 -75
  461. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/services_worker.py +0 -34
  462. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/task_worker.py +0 -33
  463. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/validate_crds_worker.py +0 -34
  464. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/vdb_worker.py +0 -51
  465. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/webhooks_worker.py +0 -34
  466. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/__init__.py +0 -3
  467. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/bundle_helper.py +0 -154
  468. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/constants.py +0 -137
  469. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/helper.py +0 -12
  470. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/kubectl_command_helper.py +0 -646
  471. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/messages.py +0 -16
  472. services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/summary.py +0 -222
  473. services/service_mesh/tests/__init__.py +0 -4
  474. {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/LICENSE.txt +0 -0
  475. {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  476. {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/WHEEL +0 -0
  477. {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/entry_points.txt +0 -0
  478. {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/top_level.txt +0 -0
@@ -1,2665 +0,0 @@
1
- # coding: utf-8
2
- # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
- # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
- # NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210101
5
-
6
- from __future__ import print_function
7
- import click
8
- import oci # noqa: F401
9
- import six # noqa: F401
10
- import sys # noqa: F401
11
- from oci_cli.cli_root import cli
12
- from oci_cli import cli_constants # noqa: F401
13
- from oci_cli import cli_util
14
- from oci_cli import json_skeleton_utils
15
- from oci_cli import custom_types # noqa: F401
16
- from oci_cli.aliasing import CommandGroupWithAlias
17
-
18
-
19
- @cli.command(cli_util.override('anomaly_detection.anomaly_detection_root_group.command_name', 'anomaly-detection'), cls=CommandGroupWithAlias, help=cli_util.override('anomaly_detection.anomaly_detection_root_group.help', """OCI AI Service solutions can help Enterprise customers integrate AI into their products immediately by using our proven,
20
- pre-trained/custom models or containers, and without a need to set up in house team of AI and ML experts.
21
- This allows enterprises to focus on business drivers and development work rather than AI/ML operations, shortening the time to market."""), short_help=cli_util.override('anomaly_detection.anomaly_detection_root_group.short_help', """Anomaly Detection API"""))
22
- @cli_util.help_option_group
23
- def anomaly_detection_root_group():
24
- pass
25
-
26
-
27
- @click.command(cli_util.override('anomaly_detection.data_asset_collection_group.command_name', 'data-asset-collection'), cls=CommandGroupWithAlias, help="""Results of a dataAsset search. Contains both DataAssetSummary items and other data.""")
28
- @cli_util.help_option_group
29
- def data_asset_collection_group():
30
- pass
31
-
32
-
33
- @click.command(cli_util.override('anomaly_detection.ai_private_endpoint_collection_group.command_name', 'ai-private-endpoint-collection'), cls=CommandGroupWithAlias, help="""A collection of AI Service PrivateEndpoints Each item is a AI Service PrivateEndpoint Summary object.""")
34
- @cli_util.help_option_group
35
- def ai_private_endpoint_collection_group():
36
- pass
37
-
38
-
39
- @click.command(cli_util.override('anomaly_detection.data_asset_group.command_name', 'data-asset'), cls=CommandGroupWithAlias, help="""Description of DataAsset.""")
40
- @cli_util.help_option_group
41
- def data_asset_group():
42
- pass
43
-
44
-
45
- @click.command(cli_util.override('anomaly_detection.work_request_error_group.command_name', 'work-request-error'), cls=CommandGroupWithAlias, help="""An error encountered while executing a work request.""")
46
- @cli_util.help_option_group
47
- def work_request_error_group():
48
- pass
49
-
50
-
51
- @click.command(cli_util.override('anomaly_detection.project_group.command_name', 'project'), cls=CommandGroupWithAlias, help="""Project enable users to organize their resources.""")
52
- @cli_util.help_option_group
53
- def project_group():
54
- pass
55
-
56
-
57
- @click.command(cli_util.override('anomaly_detection.model_group.command_name', 'model'), cls=CommandGroupWithAlias, help="""Description of Model.""")
58
- @cli_util.help_option_group
59
- def model_group():
60
- pass
61
-
62
-
63
- @click.command(cli_util.override('anomaly_detection.work_request_log_entry_group.command_name', 'work-request-log-entry'), cls=CommandGroupWithAlias, help="""A log message from the execution of a work request.""")
64
- @cli_util.help_option_group
65
- def work_request_log_entry_group():
66
- pass
67
-
68
-
69
- @click.command(cli_util.override('anomaly_detection.work_request_group.command_name', 'work-request'), cls=CommandGroupWithAlias, help="""A description of workrequest status""")
70
- @cli_util.help_option_group
71
- def work_request_group():
72
- pass
73
-
74
-
75
- @click.command(cli_util.override('anomaly_detection.detect_anomaly_job_collection_group.command_name', 'detect-anomaly-job-collection'), cls=CommandGroupWithAlias, help="""A collection of anomaly jobs. Each item is a DetectAnomalyJob summary object.""")
76
- @cli_util.help_option_group
77
- def detect_anomaly_job_collection_group():
78
- pass
79
-
80
-
81
- @click.command(cli_util.override('anomaly_detection.ai_private_endpoint_group.command_name', 'ai-private-endpoint'), cls=CommandGroupWithAlias, help="""A private network reverse connection creates a connection from service to customer subnet over a private network.""")
82
- @cli_util.help_option_group
83
- def ai_private_endpoint_group():
84
- pass
85
-
86
-
87
- @click.command(cli_util.override('anomaly_detection.detect_anomaly_job_group.command_name', 'detect-anomaly-job'), cls=CommandGroupWithAlias, help="""Anomaly Job contains information for asynchronous detection of anomalies.""")
88
- @cli_util.help_option_group
89
- def detect_anomaly_job_group():
90
- pass
91
-
92
-
93
- anomaly_detection_root_group.add_command(data_asset_collection_group)
94
- anomaly_detection_root_group.add_command(ai_private_endpoint_collection_group)
95
- anomaly_detection_root_group.add_command(data_asset_group)
96
- anomaly_detection_root_group.add_command(work_request_error_group)
97
- anomaly_detection_root_group.add_command(project_group)
98
- anomaly_detection_root_group.add_command(model_group)
99
- anomaly_detection_root_group.add_command(work_request_log_entry_group)
100
- anomaly_detection_root_group.add_command(work_request_group)
101
- anomaly_detection_root_group.add_command(detect_anomaly_job_collection_group)
102
- anomaly_detection_root_group.add_command(ai_private_endpoint_group)
103
- anomaly_detection_root_group.add_command(detect_anomaly_job_group)
104
-
105
-
106
- @work_request_group.command(name=cli_util.override('anomaly_detection.cancel_work_request.command_name', 'cancel'), help=u"""Cancel work request with the given ID. \n[Command Reference](cancelWorkRequest)""")
107
- @cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
108
- @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.""")
109
- @cli_util.confirm_delete_option
110
- @json_skeleton_utils.get_cli_json_input_option({})
111
- @cli_util.help_option
112
- @click.pass_context
113
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
114
- @cli_util.wrap_exceptions
115
- def cancel_work_request(ctx, from_json, work_request_id, if_match):
116
-
117
- if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
118
- raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
119
-
120
- kwargs = {}
121
- if if_match is not None:
122
- kwargs['if_match'] = if_match
123
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
124
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
125
- result = client.cancel_work_request(
126
- work_request_id=work_request_id,
127
- **kwargs
128
- )
129
- cli_util.render_response(result, ctx)
130
-
131
-
132
- @ai_private_endpoint_group.command(name=cli_util.override('anomaly_detection.change_ai_private_endpoint_compartment.command_name', 'change-compartment'), help=u"""Moves a resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. \n[Command Reference](changeAiPrivateEndpointCompartment)""")
133
- @cli_util.option('--ai-private-endpoint-id', required=True, help=u"""Unique private reverse connection identifier.""")
134
- @cli_util.option('--compartment-id', required=True, help=u"""The identifier of the compartment where the resource should be moved.""")
135
- @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.""")
136
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED"]), 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.""")
137
- @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.""")
138
- @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.""")
139
- @json_skeleton_utils.get_cli_json_input_option({})
140
- @cli_util.help_option
141
- @click.pass_context
142
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
143
- @cli_util.wrap_exceptions
144
- def change_ai_private_endpoint_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ai_private_endpoint_id, compartment_id, if_match):
145
-
146
- if isinstance(ai_private_endpoint_id, six.string_types) and len(ai_private_endpoint_id.strip()) == 0:
147
- raise click.UsageError('Parameter --ai-private-endpoint-id cannot be whitespace or empty string')
148
-
149
- kwargs = {}
150
- if if_match is not None:
151
- kwargs['if_match'] = if_match
152
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
153
-
154
- _details = {}
155
- _details['compartmentId'] = compartment_id
156
-
157
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
158
- result = client.change_ai_private_endpoint_compartment(
159
- ai_private_endpoint_id=ai_private_endpoint_id,
160
- change_ai_private_endpoint_compartment_details=_details,
161
- **kwargs
162
- )
163
- if wait_for_state:
164
-
165
- if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
166
- try:
167
- wait_period_kwargs = {}
168
- if max_wait_seconds is not None:
169
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
170
- if wait_interval_seconds is not None:
171
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
172
- if 'opc-work-request-id' not in result.headers:
173
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
174
- cli_util.render_response(result, ctx)
175
- return
176
-
177
- click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
178
- result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
179
- except oci.exceptions.MaximumWaitTimeExceeded as e:
180
- # If we fail, we should show an error, but we should still provide the information to the customer
181
- click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
182
- cli_util.render_response(result, ctx)
183
- sys.exit(2)
184
- except Exception:
185
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
186
- cli_util.render_response(result, ctx)
187
- raise
188
- else:
189
- click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
190
- cli_util.render_response(result, ctx)
191
-
192
-
193
- @data_asset_group.command(name=cli_util.override('anomaly_detection.change_data_asset_compartment.command_name', 'change-compartment'), help=u"""Changing the compartment of a data asset. \n[Command Reference](changeDataAssetCompartment)""")
194
- @cli_util.option('--data-asset-id', required=True, help=u"""The OCID of the Data Asset.""")
195
- @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment into which the resource should be moved.""")
196
- @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.""")
197
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), 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.""")
198
- @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.""")
199
- @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.""")
200
- @json_skeleton_utils.get_cli_json_input_option({})
201
- @cli_util.help_option
202
- @click.pass_context
203
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'DataAsset'})
204
- @cli_util.wrap_exceptions
205
- def change_data_asset_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, data_asset_id, compartment_id, if_match):
206
-
207
- if isinstance(data_asset_id, six.string_types) and len(data_asset_id.strip()) == 0:
208
- raise click.UsageError('Parameter --data-asset-id cannot be whitespace or empty string')
209
-
210
- kwargs = {}
211
- if if_match is not None:
212
- kwargs['if_match'] = if_match
213
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
214
-
215
- _details = {}
216
- _details['compartmentId'] = compartment_id
217
-
218
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
219
- result = client.change_data_asset_compartment(
220
- data_asset_id=data_asset_id,
221
- change_data_asset_compartment_details=_details,
222
- **kwargs
223
- )
224
- if wait_for_state:
225
-
226
- if hasattr(client, 'get_data_asset') and callable(getattr(client, 'get_data_asset')):
227
- try:
228
- wait_period_kwargs = {}
229
- if max_wait_seconds is not None:
230
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
231
- if wait_interval_seconds is not None:
232
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
233
-
234
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
235
- result = oci.wait_until(client, client.get_data_asset(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
236
- except oci.exceptions.MaximumWaitTimeExceeded as e:
237
- # If we fail, we should show an error, but we should still provide the information to the customer
238
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
239
- cli_util.render_response(result, ctx)
240
- sys.exit(2)
241
- except Exception:
242
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
243
- cli_util.render_response(result, ctx)
244
- raise
245
- else:
246
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
247
- cli_util.render_response(result, ctx)
248
-
249
-
250
- @detect_anomaly_job_group.command(name=cli_util.override('anomaly_detection.change_detect_anomaly_job_compartment.command_name', 'change-compartment'), help=u"""Moves a asynchronous anomaly detect job resource from one compartment to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeDetectAnomalyJobCompartment)""")
251
- @cli_util.option('--detect-anomaly-job-id', required=True, help=u"""Unique asynchronous job identifier.""")
252
- @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment the resource should be moved to.""")
253
- @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.""")
254
- @json_skeleton_utils.get_cli_json_input_option({})
255
- @cli_util.help_option
256
- @click.pass_context
257
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
258
- @cli_util.wrap_exceptions
259
- def change_detect_anomaly_job_compartment(ctx, from_json, detect_anomaly_job_id, compartment_id, if_match):
260
-
261
- if isinstance(detect_anomaly_job_id, six.string_types) and len(detect_anomaly_job_id.strip()) == 0:
262
- raise click.UsageError('Parameter --detect-anomaly-job-id cannot be whitespace or empty string')
263
-
264
- kwargs = {}
265
- if if_match is not None:
266
- kwargs['if_match'] = if_match
267
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
268
-
269
- _details = {}
270
- _details['compartmentId'] = compartment_id
271
-
272
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
273
- result = client.change_detect_anomaly_job_compartment(
274
- detect_anomaly_job_id=detect_anomaly_job_id,
275
- change_detect_anomaly_job_compartment_details=_details,
276
- **kwargs
277
- )
278
- cli_util.render_response(result, ctx)
279
-
280
-
281
- @model_group.command(name=cli_util.override('anomaly_detection.change_model_compartment.command_name', 'change-compartment'), help=u"""Moves a Model resource from one compartment to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeModelCompartment)""")
282
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the Model.""")
283
- @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment into which the resource should be moved.""")
284
- @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.""")
285
- @json_skeleton_utils.get_cli_json_input_option({})
286
- @cli_util.help_option
287
- @click.pass_context
288
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
289
- @cli_util.wrap_exceptions
290
- def change_model_compartment(ctx, from_json, model_id, compartment_id, if_match):
291
-
292
- if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
293
- raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
294
-
295
- kwargs = {}
296
- if if_match is not None:
297
- kwargs['if_match'] = if_match
298
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
299
-
300
- _details = {}
301
- _details['compartmentId'] = compartment_id
302
-
303
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
304
- result = client.change_model_compartment(
305
- model_id=model_id,
306
- change_model_compartment_details=_details,
307
- **kwargs
308
- )
309
- cli_util.render_response(result, ctx)
310
-
311
-
312
- @project_group.command(name=cli_util.override('anomaly_detection.change_project_compartment.command_name', 'change-compartment'), help=u"""Moves a Project resource from one compartment to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeProjectCompartment)""")
313
- @cli_util.option('--project-id', required=True, help=u"""The OCID of the Project.""")
314
- @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment into which the resource should be moved.""")
315
- @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.""")
316
- @json_skeleton_utils.get_cli_json_input_option({})
317
- @cli_util.help_option
318
- @click.pass_context
319
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
320
- @cli_util.wrap_exceptions
321
- def change_project_compartment(ctx, from_json, project_id, compartment_id, if_match):
322
-
323
- if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
324
- raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
325
-
326
- kwargs = {}
327
- if if_match is not None:
328
- kwargs['if_match'] = if_match
329
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
330
-
331
- _details = {}
332
- _details['compartmentId'] = compartment_id
333
-
334
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
335
- result = client.change_project_compartment(
336
- project_id=project_id,
337
- change_project_compartment_details=_details,
338
- **kwargs
339
- )
340
- cli_util.render_response(result, ctx)
341
-
342
-
343
- @ai_private_endpoint_group.command(name=cli_util.override('anomaly_detection.create_ai_private_endpoint.command_name', 'create'), help=u"""Create a new private reverse connection endpoint. \n[Command Reference](createAiPrivateEndpoint)""")
344
- @cli_util.option('--dns-zones', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of DNS zones to be used by the data assets. Example: custpvtsubnet.oraclevcn.com for data asset: db.custpvtsubnet.oraclevcn.com""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
345
- @cli_util.option('--subnet-id', required=True, help=u"""The OCID of subnet to which the reverse connection is to be created.""")
346
- @cli_util.option('--compartment-id', required=True, help=u"""Compartment identifier.""")
347
- @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)
348
- @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)
349
- @cli_util.option('--display-name', help=u"""Display name of the private endpoint resource being created.""")
350
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED"]), 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.""")
351
- @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.""")
352
- @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.""")
353
- @json_skeleton_utils.get_cli_json_input_option({'dns-zones': {'module': 'ai_anomaly_detection', 'class': 'list[string]'}, 'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
354
- @cli_util.help_option
355
- @click.pass_context
356
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'dns-zones': {'module': 'ai_anomaly_detection', 'class': 'list[string]'}, 'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
357
- @cli_util.wrap_exceptions
358
- def create_ai_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, dns_zones, subnet_id, compartment_id, freeform_tags, defined_tags, display_name):
359
-
360
- kwargs = {}
361
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
362
-
363
- _details = {}
364
- _details['dnsZones'] = cli_util.parse_json_parameter("dns_zones", dns_zones)
365
- _details['subnetId'] = subnet_id
366
- _details['compartmentId'] = compartment_id
367
-
368
- if freeform_tags is not None:
369
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
370
-
371
- if defined_tags is not None:
372
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
373
-
374
- if display_name is not None:
375
- _details['displayName'] = display_name
376
-
377
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
378
- result = client.create_ai_private_endpoint(
379
- create_ai_private_endpoint_details=_details,
380
- **kwargs
381
- )
382
- if wait_for_state:
383
-
384
- if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
385
- try:
386
- wait_period_kwargs = {}
387
- if max_wait_seconds is not None:
388
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
389
- if wait_interval_seconds is not None:
390
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
391
- if 'opc-work-request-id' not in result.headers:
392
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
393
- cli_util.render_response(result, ctx)
394
- return
395
-
396
- click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
397
- result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
398
- except oci.exceptions.MaximumWaitTimeExceeded as e:
399
- # If we fail, we should show an error, but we should still provide the information to the customer
400
- click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
401
- cli_util.render_response(result, ctx)
402
- sys.exit(2)
403
- except Exception:
404
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
405
- cli_util.render_response(result, ctx)
406
- raise
407
- else:
408
- click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
409
- cli_util.render_response(result, ctx)
410
-
411
-
412
- @data_asset_group.command(name=cli_util.override('anomaly_detection.create_data_asset.command_name', 'create'), help=u"""Creates a new DataAsset. \n[Command Reference](createDataAsset)""")
413
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID for the data asset's compartment.""")
414
- @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the data asset.""")
415
- @cli_util.option('--data-source-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
416
- @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.""")
417
- @cli_util.option('--description', help=u"""A short description of the Ai data asset""")
418
- @cli_util.option('--private-endpoint-id', help=u"""OCID of Private Endpoint.""")
419
- @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)
420
- @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)
421
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), 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.""")
422
- @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.""")
423
- @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.""")
424
- @json_skeleton_utils.get_cli_json_input_option({'data-source-details': {'module': 'ai_anomaly_detection', 'class': 'DataSourceDetails'}, 'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
425
- @cli_util.help_option
426
- @click.pass_context
427
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'data-source-details': {'module': 'ai_anomaly_detection', 'class': 'DataSourceDetails'}, 'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DataAsset'})
428
- @cli_util.wrap_exceptions
429
- def create_data_asset(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, project_id, data_source_details, display_name, description, private_endpoint_id, freeform_tags, defined_tags):
430
-
431
- kwargs = {}
432
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
433
-
434
- _details = {}
435
- _details['compartmentId'] = compartment_id
436
- _details['projectId'] = project_id
437
- _details['dataSourceDetails'] = cli_util.parse_json_parameter("data_source_details", data_source_details)
438
-
439
- if display_name is not None:
440
- _details['displayName'] = display_name
441
-
442
- if description is not None:
443
- _details['description'] = description
444
-
445
- if private_endpoint_id is not None:
446
- _details['privateEndpointId'] = private_endpoint_id
447
-
448
- if freeform_tags is not None:
449
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
450
-
451
- if defined_tags is not None:
452
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
453
-
454
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
455
- result = client.create_data_asset(
456
- create_data_asset_details=_details,
457
- **kwargs
458
- )
459
- if wait_for_state:
460
-
461
- if hasattr(client, 'get_data_asset') and callable(getattr(client, 'get_data_asset')):
462
- try:
463
- wait_period_kwargs = {}
464
- if max_wait_seconds is not None:
465
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
466
- if wait_interval_seconds is not None:
467
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
468
-
469
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
470
- result = oci.wait_until(client, client.get_data_asset(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
471
- except oci.exceptions.MaximumWaitTimeExceeded as e:
472
- # If we fail, we should show an error, but we should still provide the information to the customer
473
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
474
- cli_util.render_response(result, ctx)
475
- sys.exit(2)
476
- except Exception:
477
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
478
- cli_util.render_response(result, ctx)
479
- raise
480
- else:
481
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
482
- cli_util.render_response(result, ctx)
483
-
484
-
485
- @data_asset_group.command(name=cli_util.override('anomaly_detection.create_data_asset_data_source_details_object_storage.command_name', 'create-data-asset-data-source-details-object-storage'), help=u"""Creates a new DataAsset. \n[Command Reference](createDataAsset)""")
486
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID for the data asset's compartment.""")
487
- @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the data asset.""")
488
- @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.""")
489
- @cli_util.option('--description', help=u"""A short description of the Ai data asset""")
490
- @cli_util.option('--private-endpoint-id', help=u"""OCID of Private Endpoint.""")
491
- @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)
492
- @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)
493
- @cli_util.option('--data-source-details-namespace', help=u"""Object storage namespace""")
494
- @cli_util.option('--data-source-details-bucket-name', help=u"""Object storage bucket name""")
495
- @cli_util.option('--data-source-details-object-name', help=u"""File name""")
496
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), 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.""")
497
- @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.""")
498
- @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.""")
499
- @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
500
- @cli_util.help_option
501
- @click.pass_context
502
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DataAsset'})
503
- @cli_util.wrap_exceptions
504
- def create_data_asset_data_source_details_object_storage(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, project_id, display_name, description, private_endpoint_id, freeform_tags, defined_tags, data_source_details_namespace, data_source_details_bucket_name, data_source_details_object_name):
505
-
506
- kwargs = {}
507
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
508
-
509
- _details = {}
510
- _details['dataSourceDetails'] = {}
511
- _details['compartmentId'] = compartment_id
512
- _details['projectId'] = project_id
513
-
514
- if display_name is not None:
515
- _details['displayName'] = display_name
516
-
517
- if description is not None:
518
- _details['description'] = description
519
-
520
- if private_endpoint_id is not None:
521
- _details['privateEndpointId'] = private_endpoint_id
522
-
523
- if freeform_tags is not None:
524
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
525
-
526
- if defined_tags is not None:
527
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
528
-
529
- if data_source_details_namespace is not None:
530
- _details['dataSourceDetails']['namespace'] = data_source_details_namespace
531
-
532
- if data_source_details_bucket_name is not None:
533
- _details['dataSourceDetails']['bucketName'] = data_source_details_bucket_name
534
-
535
- if data_source_details_object_name is not None:
536
- _details['dataSourceDetails']['objectName'] = data_source_details_object_name
537
-
538
- _details['dataSourceDetails']['dataSourceType'] = 'ORACLE_OBJECT_STORAGE'
539
-
540
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
541
- result = client.create_data_asset(
542
- create_data_asset_details=_details,
543
- **kwargs
544
- )
545
- if wait_for_state:
546
-
547
- if hasattr(client, 'get_data_asset') and callable(getattr(client, 'get_data_asset')):
548
- try:
549
- wait_period_kwargs = {}
550
- if max_wait_seconds is not None:
551
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
552
- if wait_interval_seconds is not None:
553
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
554
-
555
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
556
- result = oci.wait_until(client, client.get_data_asset(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
557
- except oci.exceptions.MaximumWaitTimeExceeded as e:
558
- # If we fail, we should show an error, but we should still provide the information to the customer
559
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
560
- cli_util.render_response(result, ctx)
561
- sys.exit(2)
562
- except Exception:
563
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
564
- cli_util.render_response(result, ctx)
565
- raise
566
- else:
567
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
568
- cli_util.render_response(result, ctx)
569
-
570
-
571
- @data_asset_group.command(name=cli_util.override('anomaly_detection.create_data_asset_data_source_details_influx.command_name', 'create-data-asset-data-source-details-influx'), help=u"""Creates a new DataAsset. \n[Command Reference](createDataAsset)""")
572
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID for the data asset's compartment.""")
573
- @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the data asset.""")
574
- @cli_util.option('--data-source-details-version-specific-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
575
- @cli_util.option('--data-source-details-user-name', required=True, help=u"""Username for connection to Influx""")
576
- @cli_util.option('--data-source-details-password-secret-id', required=True, help=u"""Password Secret Id for the influx connection""")
577
- @cli_util.option('--data-source-details-measurement-name', required=True, help=u"""Measurement name for influx""")
578
- @cli_util.option('--data-source-details-url', required=True, help=u"""public IP address and port to influx DB""")
579
- @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.""")
580
- @cli_util.option('--description', help=u"""A short description of the Ai data asset""")
581
- @cli_util.option('--private-endpoint-id', help=u"""OCID of Private Endpoint.""")
582
- @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)
583
- @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)
584
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), 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.""")
585
- @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.""")
586
- @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.""")
587
- @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}, 'data-source-details-version-specific-details': {'module': 'ai_anomaly_detection', 'class': 'InfluxDetails'}})
588
- @cli_util.help_option
589
- @click.pass_context
590
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}, 'data-source-details-version-specific-details': {'module': 'ai_anomaly_detection', 'class': 'InfluxDetails'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DataAsset'})
591
- @cli_util.wrap_exceptions
592
- def create_data_asset_data_source_details_influx(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, project_id, data_source_details_version_specific_details, data_source_details_user_name, data_source_details_password_secret_id, data_source_details_measurement_name, data_source_details_url, display_name, description, private_endpoint_id, freeform_tags, defined_tags):
593
-
594
- kwargs = {}
595
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
596
-
597
- _details = {}
598
- _details['dataSourceDetails'] = {}
599
- _details['compartmentId'] = compartment_id
600
- _details['projectId'] = project_id
601
- _details['dataSourceDetails']['versionSpecificDetails'] = cli_util.parse_json_parameter("data_source_details_version_specific_details", data_source_details_version_specific_details)
602
- _details['dataSourceDetails']['userName'] = data_source_details_user_name
603
- _details['dataSourceDetails']['passwordSecretId'] = data_source_details_password_secret_id
604
- _details['dataSourceDetails']['measurementName'] = data_source_details_measurement_name
605
- _details['dataSourceDetails']['url'] = data_source_details_url
606
-
607
- if display_name is not None:
608
- _details['displayName'] = display_name
609
-
610
- if description is not None:
611
- _details['description'] = description
612
-
613
- if private_endpoint_id is not None:
614
- _details['privateEndpointId'] = private_endpoint_id
615
-
616
- if freeform_tags is not None:
617
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
618
-
619
- if defined_tags is not None:
620
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
621
-
622
- _details['dataSourceDetails']['dataSourceType'] = 'INFLUX'
623
-
624
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
625
- result = client.create_data_asset(
626
- create_data_asset_details=_details,
627
- **kwargs
628
- )
629
- if wait_for_state:
630
-
631
- if hasattr(client, 'get_data_asset') and callable(getattr(client, 'get_data_asset')):
632
- try:
633
- wait_period_kwargs = {}
634
- if max_wait_seconds is not None:
635
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
636
- if wait_interval_seconds is not None:
637
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
638
-
639
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
640
- result = oci.wait_until(client, client.get_data_asset(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
641
- except oci.exceptions.MaximumWaitTimeExceeded as e:
642
- # If we fail, we should show an error, but we should still provide the information to the customer
643
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
644
- cli_util.render_response(result, ctx)
645
- sys.exit(2)
646
- except Exception:
647
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
648
- cli_util.render_response(result, ctx)
649
- raise
650
- else:
651
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
652
- cli_util.render_response(result, ctx)
653
-
654
-
655
- @data_asset_group.command(name=cli_util.override('anomaly_detection.create_data_asset_data_source_details_atp.command_name', 'create-data-asset-data-source-details-atp'), help=u"""Creates a new DataAsset. \n[Command Reference](createDataAsset)""")
656
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID for the data asset's compartment.""")
657
- @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the data asset.""")
658
- @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.""")
659
- @cli_util.option('--description', help=u"""A short description of the Ai data asset""")
660
- @cli_util.option('--private-endpoint-id', help=u"""OCID of Private Endpoint.""")
661
- @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)
662
- @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)
663
- @cli_util.option('--data-source-details-wallet-password-secret-id', help=u"""wallet password Secret ID in String format""")
664
- @cli_util.option('--data-source-details-atp-user-name', help=u"""atp db user name""")
665
- @cli_util.option('--data-source-details-atp-password-secret-id', help=u"""atp db password Secret Id""")
666
- @cli_util.option('--data-source-details-cwallet-file-secret-id', help=u"""OCID of the secret containing the containers certificates of ATP wallet""")
667
- @cli_util.option('--data-source-details-ewallet-file-secret-id', help=u"""OCID of the secret containing the PDB'S certificates of ATP wallet""")
668
- @cli_util.option('--data-source-details-key-store-file-secret-id', help=u"""OCID of the secret containing Keystore.jks file of the ATP wallet""")
669
- @cli_util.option('--data-source-details-ojdbc-file-secret-id', help=u"""OCID of the secret that contains jdbc properties file of ATP wallet""")
670
- @cli_util.option('--data-source-details-tnsnames-file-secret-id', help=u"""OCID of the secret that contains the tnsnames file of ATP wallet""")
671
- @cli_util.option('--data-source-details-truststore-file-secret-id', help=u"""OCID of the secret containing truststore.jks file of the ATP wallet""")
672
- @cli_util.option('--data-source-details-database-name', help=u"""atp database name""")
673
- @cli_util.option('--data-source-details-table-name', help=u"""atp database table name""")
674
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), 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.""")
675
- @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.""")
676
- @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.""")
677
- @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
678
- @cli_util.help_option
679
- @click.pass_context
680
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DataAsset'})
681
- @cli_util.wrap_exceptions
682
- def create_data_asset_data_source_details_atp(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, project_id, display_name, description, private_endpoint_id, freeform_tags, defined_tags, data_source_details_wallet_password_secret_id, data_source_details_atp_user_name, data_source_details_atp_password_secret_id, data_source_details_cwallet_file_secret_id, data_source_details_ewallet_file_secret_id, data_source_details_key_store_file_secret_id, data_source_details_ojdbc_file_secret_id, data_source_details_tnsnames_file_secret_id, data_source_details_truststore_file_secret_id, data_source_details_database_name, data_source_details_table_name):
683
-
684
- kwargs = {}
685
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
686
-
687
- _details = {}
688
- _details['dataSourceDetails'] = {}
689
- _details['compartmentId'] = compartment_id
690
- _details['projectId'] = project_id
691
-
692
- if display_name is not None:
693
- _details['displayName'] = display_name
694
-
695
- if description is not None:
696
- _details['description'] = description
697
-
698
- if private_endpoint_id is not None:
699
- _details['privateEndpointId'] = private_endpoint_id
700
-
701
- if freeform_tags is not None:
702
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
703
-
704
- if defined_tags is not None:
705
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
706
-
707
- if data_source_details_wallet_password_secret_id is not None:
708
- _details['dataSourceDetails']['walletPasswordSecretId'] = data_source_details_wallet_password_secret_id
709
-
710
- if data_source_details_atp_user_name is not None:
711
- _details['dataSourceDetails']['atpUserName'] = data_source_details_atp_user_name
712
-
713
- if data_source_details_atp_password_secret_id is not None:
714
- _details['dataSourceDetails']['atpPasswordSecretId'] = data_source_details_atp_password_secret_id
715
-
716
- if data_source_details_cwallet_file_secret_id is not None:
717
- _details['dataSourceDetails']['cwalletFileSecretId'] = data_source_details_cwallet_file_secret_id
718
-
719
- if data_source_details_ewallet_file_secret_id is not None:
720
- _details['dataSourceDetails']['ewalletFileSecretId'] = data_source_details_ewallet_file_secret_id
721
-
722
- if data_source_details_key_store_file_secret_id is not None:
723
- _details['dataSourceDetails']['keyStoreFileSecretId'] = data_source_details_key_store_file_secret_id
724
-
725
- if data_source_details_ojdbc_file_secret_id is not None:
726
- _details['dataSourceDetails']['ojdbcFileSecretId'] = data_source_details_ojdbc_file_secret_id
727
-
728
- if data_source_details_tnsnames_file_secret_id is not None:
729
- _details['dataSourceDetails']['tnsnamesFileSecretId'] = data_source_details_tnsnames_file_secret_id
730
-
731
- if data_source_details_truststore_file_secret_id is not None:
732
- _details['dataSourceDetails']['truststoreFileSecretId'] = data_source_details_truststore_file_secret_id
733
-
734
- if data_source_details_database_name is not None:
735
- _details['dataSourceDetails']['databaseName'] = data_source_details_database_name
736
-
737
- if data_source_details_table_name is not None:
738
- _details['dataSourceDetails']['tableName'] = data_source_details_table_name
739
-
740
- _details['dataSourceDetails']['dataSourceType'] = 'ORACLE_ATP'
741
-
742
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
743
- result = client.create_data_asset(
744
- create_data_asset_details=_details,
745
- **kwargs
746
- )
747
- if wait_for_state:
748
-
749
- if hasattr(client, 'get_data_asset') and callable(getattr(client, 'get_data_asset')):
750
- try:
751
- wait_period_kwargs = {}
752
- if max_wait_seconds is not None:
753
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
754
- if wait_interval_seconds is not None:
755
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
756
-
757
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
758
- result = oci.wait_until(client, client.get_data_asset(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
759
- except oci.exceptions.MaximumWaitTimeExceeded as e:
760
- # If we fail, we should show an error, but we should still provide the information to the customer
761
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
762
- cli_util.render_response(result, ctx)
763
- sys.exit(2)
764
- except Exception:
765
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
766
- cli_util.render_response(result, ctx)
767
- raise
768
- else:
769
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
770
- cli_util.render_response(result, ctx)
771
-
772
-
773
- @detect_anomaly_job_group.command(name=cli_util.override('anomaly_detection.create_detect_anomaly_job.command_name', 'create'), help=u"""Creates a job to perform anomaly detection. \n[Command Reference](createDetectAnomalyJob)""")
774
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that starts the job.""")
775
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the trained model.""")
776
- @cli_util.option('--input-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
777
- @cli_util.option('--output-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
778
- @cli_util.option('--description', help=u"""A short description of the detect anomaly job.""")
779
- @cli_util.option('--display-name', help=u"""Detect anomaly job display name.""")
780
- @cli_util.option('--sensitivity', type=click.FLOAT, help=u"""The value that customer can adjust to control the sensitivity of anomaly detection""")
781
- @cli_util.option('--are-all-estimates-required', type=click.BOOL, help=u"""Flag to enable the service to return estimates for all data points rather than just the anomalous data points.""")
782
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "PARTIALLY_SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS"]), 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.""")
783
- @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.""")
784
- @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.""")
785
- @json_skeleton_utils.get_cli_json_input_option({'input-details': {'module': 'ai_anomaly_detection', 'class': 'InputDetails'}, 'output-details': {'module': 'ai_anomaly_detection', 'class': 'OutputDetails'}})
786
- @cli_util.help_option
787
- @click.pass_context
788
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'input-details': {'module': 'ai_anomaly_detection', 'class': 'InputDetails'}, 'output-details': {'module': 'ai_anomaly_detection', 'class': 'OutputDetails'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DetectAnomalyJob'})
789
- @cli_util.wrap_exceptions
790
- def create_detect_anomaly_job(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, model_id, input_details, output_details, description, display_name, sensitivity, are_all_estimates_required):
791
-
792
- kwargs = {}
793
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
794
-
795
- _details = {}
796
- _details['compartmentId'] = compartment_id
797
- _details['modelId'] = model_id
798
- _details['inputDetails'] = cli_util.parse_json_parameter("input_details", input_details)
799
- _details['outputDetails'] = cli_util.parse_json_parameter("output_details", output_details)
800
-
801
- if description is not None:
802
- _details['description'] = description
803
-
804
- if display_name is not None:
805
- _details['displayName'] = display_name
806
-
807
- if sensitivity is not None:
808
- _details['sensitivity'] = sensitivity
809
-
810
- if are_all_estimates_required is not None:
811
- _details['areAllEstimatesRequired'] = are_all_estimates_required
812
-
813
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
814
- result = client.create_detect_anomaly_job(
815
- create_detect_anomaly_job_details=_details,
816
- **kwargs
817
- )
818
- if wait_for_state:
819
-
820
- if hasattr(client, 'get_detect_anomaly_job') and callable(getattr(client, 'get_detect_anomaly_job')):
821
- try:
822
- wait_period_kwargs = {}
823
- if max_wait_seconds is not None:
824
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
825
- if wait_interval_seconds is not None:
826
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
827
-
828
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
829
- result = oci.wait_until(client, client.get_detect_anomaly_job(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
830
- except oci.exceptions.MaximumWaitTimeExceeded as e:
831
- # If we fail, we should show an error, but we should still provide the information to the customer
832
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
833
- cli_util.render_response(result, ctx)
834
- sys.exit(2)
835
- except Exception:
836
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
837
- cli_util.render_response(result, ctx)
838
- raise
839
- else:
840
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
841
- cli_util.render_response(result, ctx)
842
-
843
-
844
- @detect_anomaly_job_group.command(name=cli_util.override('anomaly_detection.create_detect_anomaly_job_embedded_input_details.command_name', 'create-detect-anomaly-job-embedded-input-details'), help=u"""Creates a job to perform anomaly detection. \n[Command Reference](createDetectAnomalyJob)""")
845
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that starts the job.""")
846
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the trained model.""")
847
- @cli_util.option('--output-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
848
- @cli_util.option('--input-details-content-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["CSV", "JSON"]), help=u"""""")
849
- @cli_util.option('--input-details-content', required=True, help=u"""""")
850
- @cli_util.option('--description', help=u"""A short description of the detect anomaly job.""")
851
- @cli_util.option('--display-name', help=u"""Detect anomaly job display name.""")
852
- @cli_util.option('--sensitivity', type=click.FLOAT, help=u"""The value that customer can adjust to control the sensitivity of anomaly detection""")
853
- @cli_util.option('--are-all-estimates-required', type=click.BOOL, help=u"""Flag to enable the service to return estimates for all data points rather than just the anomalous data points.""")
854
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "PARTIALLY_SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS"]), 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.""")
855
- @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.""")
856
- @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.""")
857
- @json_skeleton_utils.get_cli_json_input_option({'output-details': {'module': 'ai_anomaly_detection', 'class': 'OutputDetails'}})
858
- @cli_util.help_option
859
- @click.pass_context
860
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'output-details': {'module': 'ai_anomaly_detection', 'class': 'OutputDetails'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DetectAnomalyJob'})
861
- @cli_util.wrap_exceptions
862
- def create_detect_anomaly_job_embedded_input_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, model_id, output_details, input_details_content_type, input_details_content, description, display_name, sensitivity, are_all_estimates_required):
863
-
864
- kwargs = {}
865
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
866
-
867
- _details = {}
868
- _details['inputDetails'] = {}
869
- _details['compartmentId'] = compartment_id
870
- _details['modelId'] = model_id
871
- _details['outputDetails'] = cli_util.parse_json_parameter("output_details", output_details)
872
- _details['inputDetails']['contentType'] = input_details_content_type
873
- _details['inputDetails']['content'] = input_details_content
874
-
875
- if description is not None:
876
- _details['description'] = description
877
-
878
- if display_name is not None:
879
- _details['displayName'] = display_name
880
-
881
- if sensitivity is not None:
882
- _details['sensitivity'] = sensitivity
883
-
884
- if are_all_estimates_required is not None:
885
- _details['areAllEstimatesRequired'] = are_all_estimates_required
886
-
887
- _details['inputDetails']['inputType'] = 'BASE64_ENCODED'
888
-
889
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
890
- result = client.create_detect_anomaly_job(
891
- create_detect_anomaly_job_details=_details,
892
- **kwargs
893
- )
894
- if wait_for_state:
895
-
896
- if hasattr(client, 'get_detect_anomaly_job') and callable(getattr(client, 'get_detect_anomaly_job')):
897
- try:
898
- wait_period_kwargs = {}
899
- if max_wait_seconds is not None:
900
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
901
- if wait_interval_seconds is not None:
902
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
903
-
904
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
905
- result = oci.wait_until(client, client.get_detect_anomaly_job(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
906
- except oci.exceptions.MaximumWaitTimeExceeded as e:
907
- # If we fail, we should show an error, but we should still provide the information to the customer
908
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
909
- cli_util.render_response(result, ctx)
910
- sys.exit(2)
911
- except Exception:
912
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
913
- cli_util.render_response(result, ctx)
914
- raise
915
- else:
916
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
917
- cli_util.render_response(result, ctx)
918
-
919
-
920
- @detect_anomaly_job_group.command(name=cli_util.override('anomaly_detection.create_detect_anomaly_job_object_list_input_details.command_name', 'create-detect-anomaly-job-object-list-input-details'), help=u"""Creates a job to perform anomaly detection. \n[Command Reference](createDetectAnomalyJob)""")
921
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that starts the job.""")
922
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the trained model.""")
923
- @cli_util.option('--output-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
924
- @cli_util.option('--input-details-object-locations', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of ObjectLocations.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
925
- @cli_util.option('--description', help=u"""A short description of the detect anomaly job.""")
926
- @cli_util.option('--display-name', help=u"""Detect anomaly job display name.""")
927
- @cli_util.option('--sensitivity', type=click.FLOAT, help=u"""The value that customer can adjust to control the sensitivity of anomaly detection""")
928
- @cli_util.option('--are-all-estimates-required', type=click.BOOL, help=u"""Flag to enable the service to return estimates for all data points rather than just the anomalous data points.""")
929
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "PARTIALLY_SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS"]), 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.""")
930
- @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.""")
931
- @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.""")
932
- @json_skeleton_utils.get_cli_json_input_option({'output-details': {'module': 'ai_anomaly_detection', 'class': 'OutputDetails'}, 'input-details-object-locations': {'module': 'ai_anomaly_detection', 'class': 'list[ObjectLocation]'}})
933
- @cli_util.help_option
934
- @click.pass_context
935
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'output-details': {'module': 'ai_anomaly_detection', 'class': 'OutputDetails'}, 'input-details-object-locations': {'module': 'ai_anomaly_detection', 'class': 'list[ObjectLocation]'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DetectAnomalyJob'})
936
- @cli_util.wrap_exceptions
937
- def create_detect_anomaly_job_object_list_input_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, model_id, output_details, input_details_object_locations, description, display_name, sensitivity, are_all_estimates_required):
938
-
939
- kwargs = {}
940
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
941
-
942
- _details = {}
943
- _details['inputDetails'] = {}
944
- _details['compartmentId'] = compartment_id
945
- _details['modelId'] = model_id
946
- _details['outputDetails'] = cli_util.parse_json_parameter("output_details", output_details)
947
- _details['inputDetails']['objectLocations'] = cli_util.parse_json_parameter("input_details_object_locations", input_details_object_locations)
948
-
949
- if description is not None:
950
- _details['description'] = description
951
-
952
- if display_name is not None:
953
- _details['displayName'] = display_name
954
-
955
- if sensitivity is not None:
956
- _details['sensitivity'] = sensitivity
957
-
958
- if are_all_estimates_required is not None:
959
- _details['areAllEstimatesRequired'] = are_all_estimates_required
960
-
961
- _details['inputDetails']['inputType'] = 'OBJECT_LIST'
962
-
963
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
964
- result = client.create_detect_anomaly_job(
965
- create_detect_anomaly_job_details=_details,
966
- **kwargs
967
- )
968
- if wait_for_state:
969
-
970
- if hasattr(client, 'get_detect_anomaly_job') and callable(getattr(client, 'get_detect_anomaly_job')):
971
- try:
972
- wait_period_kwargs = {}
973
- if max_wait_seconds is not None:
974
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
975
- if wait_interval_seconds is not None:
976
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
977
-
978
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
979
- result = oci.wait_until(client, client.get_detect_anomaly_job(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
980
- except oci.exceptions.MaximumWaitTimeExceeded as e:
981
- # If we fail, we should show an error, but we should still provide the information to the customer
982
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
983
- cli_util.render_response(result, ctx)
984
- sys.exit(2)
985
- except Exception:
986
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
987
- cli_util.render_response(result, ctx)
988
- raise
989
- else:
990
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
991
- cli_util.render_response(result, ctx)
992
-
993
-
994
- @detect_anomaly_job_group.command(name=cli_util.override('anomaly_detection.create_detect_anomaly_job_inline_input_details.command_name', 'create-detect-anomaly-job-inline-input-details'), help=u"""Creates a job to perform anomaly detection. \n[Command Reference](createDetectAnomalyJob)""")
995
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that starts the job.""")
996
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the trained model.""")
997
- @cli_util.option('--output-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
998
- @cli_util.option('--input-details-signal-names', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of signal names.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
999
- @cli_util.option('--input-details-data', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Array containing data.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1000
- @cli_util.option('--description', help=u"""A short description of the detect anomaly job.""")
1001
- @cli_util.option('--display-name', help=u"""Detect anomaly job display name.""")
1002
- @cli_util.option('--sensitivity', type=click.FLOAT, help=u"""The value that customer can adjust to control the sensitivity of anomaly detection""")
1003
- @cli_util.option('--are-all-estimates-required', type=click.BOOL, help=u"""Flag to enable the service to return estimates for all data points rather than just the anomalous data points.""")
1004
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "PARTIALLY_SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS"]), 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.""")
1005
- @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.""")
1006
- @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.""")
1007
- @json_skeleton_utils.get_cli_json_input_option({'output-details': {'module': 'ai_anomaly_detection', 'class': 'OutputDetails'}, 'input-details-signal-names': {'module': 'ai_anomaly_detection', 'class': 'list[string]'}, 'input-details-data': {'module': 'ai_anomaly_detection', 'class': 'list[DataItem]'}})
1008
- @cli_util.help_option
1009
- @click.pass_context
1010
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'output-details': {'module': 'ai_anomaly_detection', 'class': 'OutputDetails'}, 'input-details-signal-names': {'module': 'ai_anomaly_detection', 'class': 'list[string]'}, 'input-details-data': {'module': 'ai_anomaly_detection', 'class': 'list[DataItem]'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DetectAnomalyJob'})
1011
- @cli_util.wrap_exceptions
1012
- def create_detect_anomaly_job_inline_input_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, model_id, output_details, input_details_signal_names, input_details_data, description, display_name, sensitivity, are_all_estimates_required):
1013
-
1014
- kwargs = {}
1015
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1016
-
1017
- _details = {}
1018
- _details['inputDetails'] = {}
1019
- _details['compartmentId'] = compartment_id
1020
- _details['modelId'] = model_id
1021
- _details['outputDetails'] = cli_util.parse_json_parameter("output_details", output_details)
1022
- _details['inputDetails']['signalNames'] = cli_util.parse_json_parameter("input_details_signal_names", input_details_signal_names)
1023
- _details['inputDetails']['data'] = cli_util.parse_json_parameter("input_details_data", input_details_data)
1024
-
1025
- if description is not None:
1026
- _details['description'] = description
1027
-
1028
- if display_name is not None:
1029
- _details['displayName'] = display_name
1030
-
1031
- if sensitivity is not None:
1032
- _details['sensitivity'] = sensitivity
1033
-
1034
- if are_all_estimates_required is not None:
1035
- _details['areAllEstimatesRequired'] = are_all_estimates_required
1036
-
1037
- _details['inputDetails']['inputType'] = 'INLINE'
1038
-
1039
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1040
- result = client.create_detect_anomaly_job(
1041
- create_detect_anomaly_job_details=_details,
1042
- **kwargs
1043
- )
1044
- if wait_for_state:
1045
-
1046
- if hasattr(client, 'get_detect_anomaly_job') and callable(getattr(client, 'get_detect_anomaly_job')):
1047
- try:
1048
- wait_period_kwargs = {}
1049
- if max_wait_seconds is not None:
1050
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1051
- if wait_interval_seconds is not None:
1052
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1053
-
1054
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1055
- result = oci.wait_until(client, client.get_detect_anomaly_job(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
1056
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1057
- # If we fail, we should show an error, but we should still provide the information to the customer
1058
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
1059
- cli_util.render_response(result, ctx)
1060
- sys.exit(2)
1061
- except Exception:
1062
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1063
- cli_util.render_response(result, ctx)
1064
- raise
1065
- else:
1066
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1067
- cli_util.render_response(result, ctx)
1068
-
1069
-
1070
- @detect_anomaly_job_group.command(name=cli_util.override('anomaly_detection.create_detect_anomaly_job_object_store_output_details.command_name', 'create-detect-anomaly-job-object-store-output-details'), help=u"""Creates a job to perform anomaly detection. \n[Command Reference](createDetectAnomalyJob)""")
1071
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that starts the job.""")
1072
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the trained model.""")
1073
- @cli_util.option('--input-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1074
- @cli_util.option('--output-details-namespace-name', required=True, help=u"""Object Storage namespace.""")
1075
- @cli_util.option('--output-details-bucket-name', required=True, help=u"""Object Storage bucket name.""")
1076
- @cli_util.option('--description', help=u"""A short description of the detect anomaly job.""")
1077
- @cli_util.option('--display-name', help=u"""Detect anomaly job display name.""")
1078
- @cli_util.option('--sensitivity', type=click.FLOAT, help=u"""The value that customer can adjust to control the sensitivity of anomaly detection""")
1079
- @cli_util.option('--are-all-estimates-required', type=click.BOOL, help=u"""Flag to enable the service to return estimates for all data points rather than just the anomalous data points.""")
1080
- @cli_util.option('--output-details-prefix', help=u"""Object Storage folder name.""")
1081
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "PARTIALLY_SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS"]), 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.""")
1082
- @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.""")
1083
- @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.""")
1084
- @json_skeleton_utils.get_cli_json_input_option({'input-details': {'module': 'ai_anomaly_detection', 'class': 'InputDetails'}})
1085
- @cli_util.help_option
1086
- @click.pass_context
1087
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'input-details': {'module': 'ai_anomaly_detection', 'class': 'InputDetails'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DetectAnomalyJob'})
1088
- @cli_util.wrap_exceptions
1089
- def create_detect_anomaly_job_object_store_output_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, model_id, input_details, output_details_namespace_name, output_details_bucket_name, description, display_name, sensitivity, are_all_estimates_required, output_details_prefix):
1090
-
1091
- kwargs = {}
1092
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1093
-
1094
- _details = {}
1095
- _details['outputDetails'] = {}
1096
- _details['compartmentId'] = compartment_id
1097
- _details['modelId'] = model_id
1098
- _details['inputDetails'] = cli_util.parse_json_parameter("input_details", input_details)
1099
- _details['outputDetails']['namespaceName'] = output_details_namespace_name
1100
- _details['outputDetails']['bucketName'] = output_details_bucket_name
1101
-
1102
- if description is not None:
1103
- _details['description'] = description
1104
-
1105
- if display_name is not None:
1106
- _details['displayName'] = display_name
1107
-
1108
- if sensitivity is not None:
1109
- _details['sensitivity'] = sensitivity
1110
-
1111
- if are_all_estimates_required is not None:
1112
- _details['areAllEstimatesRequired'] = are_all_estimates_required
1113
-
1114
- if output_details_prefix is not None:
1115
- _details['outputDetails']['prefix'] = output_details_prefix
1116
-
1117
- _details['outputDetails']['outputType'] = 'OBJECT_STORAGE'
1118
-
1119
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1120
- result = client.create_detect_anomaly_job(
1121
- create_detect_anomaly_job_details=_details,
1122
- **kwargs
1123
- )
1124
- if wait_for_state:
1125
-
1126
- if hasattr(client, 'get_detect_anomaly_job') and callable(getattr(client, 'get_detect_anomaly_job')):
1127
- try:
1128
- wait_period_kwargs = {}
1129
- if max_wait_seconds is not None:
1130
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1131
- if wait_interval_seconds is not None:
1132
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1133
-
1134
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1135
- result = oci.wait_until(client, client.get_detect_anomaly_job(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
1136
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1137
- # If we fail, we should show an error, but we should still provide the information to the customer
1138
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
1139
- cli_util.render_response(result, ctx)
1140
- sys.exit(2)
1141
- except Exception:
1142
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1143
- cli_util.render_response(result, ctx)
1144
- raise
1145
- else:
1146
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1147
- cli_util.render_response(result, ctx)
1148
-
1149
-
1150
- @model_group.command(name=cli_util.override('anomaly_detection.create_model.command_name', 'create'), help=u"""Creates a new Model. \n[Command Reference](createModel)""")
1151
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID for the ai model's compartment.""")
1152
- @cli_util.option('--model-training-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1153
- @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the model.""")
1154
- @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.""")
1155
- @cli_util.option('--description', help=u"""A short description of the ai model.""")
1156
- @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)
1157
- @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)
1158
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED"]), 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.""")
1159
- @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.""")
1160
- @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.""")
1161
- @json_skeleton_utils.get_cli_json_input_option({'model-training-details': {'module': 'ai_anomaly_detection', 'class': 'ModelTrainingDetails'}, 'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
1162
- @cli_util.help_option
1163
- @click.pass_context
1164
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'model-training-details': {'module': 'ai_anomaly_detection', 'class': 'ModelTrainingDetails'}, 'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'Model'})
1165
- @cli_util.wrap_exceptions
1166
- def create_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, model_training_details, project_id, display_name, description, freeform_tags, defined_tags):
1167
-
1168
- kwargs = {}
1169
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1170
-
1171
- _details = {}
1172
- _details['compartmentId'] = compartment_id
1173
- _details['modelTrainingDetails'] = cli_util.parse_json_parameter("model_training_details", model_training_details)
1174
- _details['projectId'] = project_id
1175
-
1176
- if display_name is not None:
1177
- _details['displayName'] = display_name
1178
-
1179
- if description is not None:
1180
- _details['description'] = description
1181
-
1182
- if freeform_tags is not None:
1183
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
1184
-
1185
- if defined_tags is not None:
1186
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
1187
-
1188
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1189
- result = client.create_model(
1190
- create_model_details=_details,
1191
- **kwargs
1192
- )
1193
- if wait_for_state:
1194
-
1195
- if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1196
- try:
1197
- wait_period_kwargs = {}
1198
- if max_wait_seconds is not None:
1199
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1200
- if wait_interval_seconds is not None:
1201
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1202
- if 'opc-work-request-id' not in result.headers:
1203
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
1204
- cli_util.render_response(result, ctx)
1205
- return
1206
-
1207
- click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1208
- result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1209
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1210
- # If we fail, we should show an error, but we should still provide the information to the customer
1211
- click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
1212
- cli_util.render_response(result, ctx)
1213
- sys.exit(2)
1214
- except Exception:
1215
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1216
- cli_util.render_response(result, ctx)
1217
- raise
1218
- else:
1219
- click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1220
- cli_util.render_response(result, ctx)
1221
-
1222
-
1223
- @project_group.command(name=cli_util.override('anomaly_detection.create_project.command_name', 'create'), help=u"""Creates a new Project. \n[Command Reference](createProject)""")
1224
- @cli_util.option('--compartment-id', required=True, help=u"""The OCID for the project's compartment.""")
1225
- @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.""")
1226
- @cli_util.option('--description', help=u"""A short description of the project.""")
1227
- @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)
1228
- @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)
1229
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "CREATING", "FAILED", "DELETING", "DELETED", "UPDATING"]), 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.""")
1230
- @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.""")
1231
- @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.""")
1232
- @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
1233
- @cli_util.help_option
1234
- @click.pass_context
1235
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'Project'})
1236
- @cli_util.wrap_exceptions
1237
- def create_project(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, description, freeform_tags, defined_tags):
1238
-
1239
- kwargs = {}
1240
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1241
-
1242
- _details = {}
1243
- _details['compartmentId'] = compartment_id
1244
-
1245
- if display_name is not None:
1246
- _details['displayName'] = display_name
1247
-
1248
- if description is not None:
1249
- _details['description'] = description
1250
-
1251
- if freeform_tags is not None:
1252
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
1253
-
1254
- if defined_tags is not None:
1255
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
1256
-
1257
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1258
- result = client.create_project(
1259
- create_project_details=_details,
1260
- **kwargs
1261
- )
1262
- if wait_for_state:
1263
-
1264
- if hasattr(client, 'get_project') and callable(getattr(client, 'get_project')):
1265
- try:
1266
- wait_period_kwargs = {}
1267
- if max_wait_seconds is not None:
1268
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1269
- if wait_interval_seconds is not None:
1270
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1271
-
1272
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1273
- result = oci.wait_until(client, client.get_project(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
1274
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1275
- # If we fail, we should show an error, but we should still provide the information to the customer
1276
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
1277
- cli_util.render_response(result, ctx)
1278
- sys.exit(2)
1279
- except Exception:
1280
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1281
- cli_util.render_response(result, ctx)
1282
- raise
1283
- else:
1284
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1285
- cli_util.render_response(result, ctx)
1286
-
1287
-
1288
- @ai_private_endpoint_group.command(name=cli_util.override('anomaly_detection.delete_ai_private_endpoint.command_name', 'delete'), help=u"""Deletes a private reverse connection endpoint by identifier. \n[Command Reference](deleteAiPrivateEndpoint)""")
1289
- @cli_util.option('--ai-private-endpoint-id', required=True, help=u"""Unique private reverse connection identifier.""")
1290
- @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.""")
1291
- @cli_util.confirm_delete_option
1292
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED"]), 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.""")
1293
- @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.""")
1294
- @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.""")
1295
- @json_skeleton_utils.get_cli_json_input_option({})
1296
- @cli_util.help_option
1297
- @click.pass_context
1298
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1299
- @cli_util.wrap_exceptions
1300
- def delete_ai_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ai_private_endpoint_id, if_match):
1301
-
1302
- if isinstance(ai_private_endpoint_id, six.string_types) and len(ai_private_endpoint_id.strip()) == 0:
1303
- raise click.UsageError('Parameter --ai-private-endpoint-id cannot be whitespace or empty string')
1304
-
1305
- kwargs = {}
1306
- if if_match is not None:
1307
- kwargs['if_match'] = if_match
1308
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1309
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1310
- result = client.delete_ai_private_endpoint(
1311
- ai_private_endpoint_id=ai_private_endpoint_id,
1312
- **kwargs
1313
- )
1314
- if wait_for_state:
1315
-
1316
- if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1317
- try:
1318
- wait_period_kwargs = {}
1319
- if max_wait_seconds is not None:
1320
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1321
- if wait_interval_seconds is not None:
1322
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1323
- if 'opc-work-request-id' not in result.headers:
1324
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
1325
- cli_util.render_response(result, ctx)
1326
- return
1327
-
1328
- click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1329
- result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1330
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1331
- # If we fail, we should show an error, but we should still provide the information to the customer
1332
- 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)
1333
- cli_util.render_response(result, ctx)
1334
- sys.exit(2)
1335
- except Exception:
1336
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1337
- cli_util.render_response(result, ctx)
1338
- raise
1339
- else:
1340
- click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1341
- cli_util.render_response(result, ctx)
1342
-
1343
-
1344
- @data_asset_group.command(name=cli_util.override('anomaly_detection.delete_data_asset.command_name', 'delete'), help=u"""Deletes a DataAsset resource by identifier \n[Command Reference](deleteDataAsset)""")
1345
- @cli_util.option('--data-asset-id', required=True, help=u"""The OCID of the Data Asset.""")
1346
- @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.""")
1347
- @cli_util.confirm_delete_option
1348
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), 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.""")
1349
- @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.""")
1350
- @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.""")
1351
- @json_skeleton_utils.get_cli_json_input_option({})
1352
- @cli_util.help_option
1353
- @click.pass_context
1354
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1355
- @cli_util.wrap_exceptions
1356
- def delete_data_asset(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, data_asset_id, if_match):
1357
-
1358
- if isinstance(data_asset_id, six.string_types) and len(data_asset_id.strip()) == 0:
1359
- raise click.UsageError('Parameter --data-asset-id cannot be whitespace or empty string')
1360
-
1361
- kwargs = {}
1362
- if if_match is not None:
1363
- kwargs['if_match'] = if_match
1364
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1365
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1366
- result = client.delete_data_asset(
1367
- data_asset_id=data_asset_id,
1368
- **kwargs
1369
- )
1370
- if wait_for_state:
1371
-
1372
- if hasattr(client, 'get_data_asset') and callable(getattr(client, 'get_data_asset')):
1373
- try:
1374
- wait_period_kwargs = {}
1375
- if max_wait_seconds is not None:
1376
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1377
- if wait_interval_seconds is not None:
1378
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1379
-
1380
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1381
- oci.wait_until(client, client.get_data_asset(data_asset_id), 'lifecycle_state', wait_for_state, succeed_on_not_found=True, **wait_period_kwargs)
1382
- except oci.exceptions.ServiceError as e:
1383
- # We make an initial service call so we can pass the result to oci.wait_until(), however if we are waiting on the
1384
- # outcome of a delete operation it is possible that the resource is already gone and so the initial service call
1385
- # will result in an exception that reflects a HTTP 404. In this case, we can exit with success (rather than raising
1386
- # the exception) since this would have been the behaviour in the waiter anyway (as for delete we provide the argument
1387
- # succeed_on_not_found=True to the waiter).
1388
- #
1389
- # Any non-404 should still result in the exception being thrown.
1390
- if e.status == 404:
1391
- pass
1392
- else:
1393
- raise
1394
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1395
- # If we fail, we should show an error, but we should still provide the information to the customer
1396
- click.echo('Failed to wait until the resource entered the specified state. Please retrieve the resource to find its current state', file=sys.stderr)
1397
- cli_util.render_response(result, ctx)
1398
- sys.exit(2)
1399
- except Exception:
1400
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1401
- cli_util.render_response(result, ctx)
1402
- raise
1403
- else:
1404
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1405
- cli_util.render_response(result, ctx)
1406
-
1407
-
1408
- @detect_anomaly_job_group.command(name=cli_util.override('anomaly_detection.delete_detect_anomaly_job.command_name', 'delete'), help=u"""Deletes an accepted, but not started detect anomaly asynchronous job. \n[Command Reference](deleteDetectAnomalyJob)""")
1409
- @cli_util.option('--detect-anomaly-job-id', required=True, help=u"""Unique asynchronous job identifier.""")
1410
- @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.""")
1411
- @cli_util.confirm_delete_option
1412
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "PARTIALLY_SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS"]), 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.""")
1413
- @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.""")
1414
- @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.""")
1415
- @json_skeleton_utils.get_cli_json_input_option({})
1416
- @cli_util.help_option
1417
- @click.pass_context
1418
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1419
- @cli_util.wrap_exceptions
1420
- def delete_detect_anomaly_job(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, detect_anomaly_job_id, if_match):
1421
-
1422
- if isinstance(detect_anomaly_job_id, six.string_types) and len(detect_anomaly_job_id.strip()) == 0:
1423
- raise click.UsageError('Parameter --detect-anomaly-job-id cannot be whitespace or empty string')
1424
-
1425
- kwargs = {}
1426
- if if_match is not None:
1427
- kwargs['if_match'] = if_match
1428
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1429
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1430
- result = client.delete_detect_anomaly_job(
1431
- detect_anomaly_job_id=detect_anomaly_job_id,
1432
- **kwargs
1433
- )
1434
- if wait_for_state:
1435
-
1436
- if hasattr(client, 'get_detect_anomaly_job') and callable(getattr(client, 'get_detect_anomaly_job')):
1437
- try:
1438
- wait_period_kwargs = {}
1439
- if max_wait_seconds is not None:
1440
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1441
- if wait_interval_seconds is not None:
1442
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1443
-
1444
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1445
- oci.wait_until(client, client.get_detect_anomaly_job(detect_anomaly_job_id), 'lifecycle_state', wait_for_state, succeed_on_not_found=True, **wait_period_kwargs)
1446
- except oci.exceptions.ServiceError as e:
1447
- # We make an initial service call so we can pass the result to oci.wait_until(), however if we are waiting on the
1448
- # outcome of a delete operation it is possible that the resource is already gone and so the initial service call
1449
- # will result in an exception that reflects a HTTP 404. In this case, we can exit with success (rather than raising
1450
- # the exception) since this would have been the behaviour in the waiter anyway (as for delete we provide the argument
1451
- # succeed_on_not_found=True to the waiter).
1452
- #
1453
- # Any non-404 should still result in the exception being thrown.
1454
- if e.status == 404:
1455
- pass
1456
- else:
1457
- raise
1458
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1459
- # If we fail, we should show an error, but we should still provide the information to the customer
1460
- click.echo('Failed to wait until the resource entered the specified state. Please retrieve the resource to find its current state', file=sys.stderr)
1461
- cli_util.render_response(result, ctx)
1462
- sys.exit(2)
1463
- except Exception:
1464
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1465
- cli_util.render_response(result, ctx)
1466
- raise
1467
- else:
1468
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1469
- cli_util.render_response(result, ctx)
1470
-
1471
-
1472
- @model_group.command(name=cli_util.override('anomaly_detection.delete_model.command_name', 'delete'), help=u"""Deletes an ai model resource by identifier. This operation fails with a 409 error unless all associated resources are in a DELETED state. You must delete all associated resources before deleting a project. \n[Command Reference](deleteModel)""")
1473
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the Model.""")
1474
- @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.""")
1475
- @cli_util.confirm_delete_option
1476
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED"]), 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.""")
1477
- @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.""")
1478
- @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.""")
1479
- @json_skeleton_utils.get_cli_json_input_option({})
1480
- @cli_util.help_option
1481
- @click.pass_context
1482
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1483
- @cli_util.wrap_exceptions
1484
- def delete_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_id, if_match):
1485
-
1486
- if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
1487
- raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
1488
-
1489
- kwargs = {}
1490
- if if_match is not None:
1491
- kwargs['if_match'] = if_match
1492
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1493
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1494
- result = client.delete_model(
1495
- model_id=model_id,
1496
- **kwargs
1497
- )
1498
- if wait_for_state:
1499
-
1500
- if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1501
- try:
1502
- wait_period_kwargs = {}
1503
- if max_wait_seconds is not None:
1504
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1505
- if wait_interval_seconds is not None:
1506
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1507
- if 'opc-work-request-id' not in result.headers:
1508
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
1509
- cli_util.render_response(result, ctx)
1510
- return
1511
-
1512
- click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1513
- result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1514
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1515
- # If we fail, we should show an error, but we should still provide the information to the customer
1516
- 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)
1517
- cli_util.render_response(result, ctx)
1518
- sys.exit(2)
1519
- except Exception:
1520
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1521
- cli_util.render_response(result, ctx)
1522
- raise
1523
- else:
1524
- click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1525
- cli_util.render_response(result, ctx)
1526
-
1527
-
1528
- @project_group.command(name=cli_util.override('anomaly_detection.delete_project.command_name', 'delete'), help=u"""Deletes a Project resource by identifier. This operation fails with a 409 error unless all associated resources (models deployments or data assets) are in a DELETED state. You must delete all associated resources before deleting a project. \n[Command Reference](deleteProject)""")
1529
- @cli_util.option('--project-id', required=True, help=u"""The OCID of the Project.""")
1530
- @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.""")
1531
- @cli_util.confirm_delete_option
1532
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED"]), 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.""")
1533
- @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.""")
1534
- @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.""")
1535
- @json_skeleton_utils.get_cli_json_input_option({})
1536
- @cli_util.help_option
1537
- @click.pass_context
1538
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1539
- @cli_util.wrap_exceptions
1540
- def delete_project(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, project_id, if_match):
1541
-
1542
- if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
1543
- raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
1544
-
1545
- kwargs = {}
1546
- if if_match is not None:
1547
- kwargs['if_match'] = if_match
1548
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1549
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1550
- result = client.delete_project(
1551
- project_id=project_id,
1552
- **kwargs
1553
- )
1554
- if wait_for_state:
1555
-
1556
- if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1557
- try:
1558
- wait_period_kwargs = {}
1559
- if max_wait_seconds is not None:
1560
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1561
- if wait_interval_seconds is not None:
1562
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1563
- if 'opc-work-request-id' not in result.headers:
1564
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
1565
- cli_util.render_response(result, ctx)
1566
- return
1567
-
1568
- click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1569
- result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1570
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1571
- # If we fail, we should show an error, but we should still provide the information to the customer
1572
- 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)
1573
- cli_util.render_response(result, ctx)
1574
- sys.exit(2)
1575
- except Exception:
1576
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1577
- cli_util.render_response(result, ctx)
1578
- raise
1579
- else:
1580
- click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1581
- cli_util.render_response(result, ctx)
1582
-
1583
-
1584
- @model_group.command(name=cli_util.override('anomaly_detection.detect_anomalies.command_name', 'detect-anomalies'), help=u"""Make a detect call with an anomaly model and detection data \n[Command Reference](detectAnomalies)""")
1585
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the trained model.""")
1586
- @cli_util.option('--request-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["INLINE", "BASE64_ENCODED"]), help=u"""Type of request. This parameter is automatically populated by classes generated by the SDK. For raw curl requests, you must provide this field.""")
1587
- @cli_util.option('--sensitivity', type=click.FLOAT, help=u"""Sensitivity of the algorithm to detect anomalies - higher the value, more anomalies get flagged. The value estimated during training is used by default. You can choose to provide a custom value.""")
1588
- @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.""")
1589
- @json_skeleton_utils.get_cli_json_input_option({})
1590
- @cli_util.help_option
1591
- @click.pass_context
1592
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'AnomalyDetectResult'})
1593
- @cli_util.wrap_exceptions
1594
- def detect_anomalies(ctx, from_json, model_id, request_type, sensitivity, if_match):
1595
-
1596
- kwargs = {}
1597
- if if_match is not None:
1598
- kwargs['if_match'] = if_match
1599
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1600
-
1601
- _details = {}
1602
- _details['modelId'] = model_id
1603
- _details['requestType'] = request_type
1604
-
1605
- if sensitivity is not None:
1606
- _details['sensitivity'] = sensitivity
1607
-
1608
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1609
- result = client.detect_anomalies(
1610
- detect_anomalies_details=_details,
1611
- **kwargs
1612
- )
1613
- cli_util.render_response(result, ctx)
1614
-
1615
-
1616
- @model_group.command(name=cli_util.override('anomaly_detection.detect_anomalies_inline_detect_anomalies_request.command_name', 'detect-anomalies-inline-detect-anomalies-request'), help=u"""Make a detect call with an anomaly model and detection data \n[Command Reference](detectAnomalies)""")
1617
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the trained model.""")
1618
- @cli_util.option('--signal-names', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of signal names.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1619
- @cli_util.option('--data', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""Array containing data.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1620
- @cli_util.option('--sensitivity', type=click.FLOAT, help=u"""Sensitivity of the algorithm to detect anomalies - higher the value, more anomalies get flagged. The value estimated during training is used by default. You can choose to provide a custom value.""")
1621
- @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.""")
1622
- @json_skeleton_utils.get_cli_json_input_option({'signal-names': {'module': 'ai_anomaly_detection', 'class': 'list[string]'}, 'data': {'module': 'ai_anomaly_detection', 'class': 'list[DataItem]'}})
1623
- @cli_util.help_option
1624
- @click.pass_context
1625
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'signal-names': {'module': 'ai_anomaly_detection', 'class': 'list[string]'}, 'data': {'module': 'ai_anomaly_detection', 'class': 'list[DataItem]'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'AnomalyDetectResult'})
1626
- @cli_util.wrap_exceptions
1627
- def detect_anomalies_inline_detect_anomalies_request(ctx, from_json, model_id, signal_names, data, sensitivity, if_match):
1628
-
1629
- kwargs = {}
1630
- if if_match is not None:
1631
- kwargs['if_match'] = if_match
1632
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1633
-
1634
- _details = {}
1635
- _details['modelId'] = model_id
1636
- _details['signalNames'] = cli_util.parse_json_parameter("signal_names", signal_names)
1637
- _details['data'] = cli_util.parse_json_parameter("data", data)
1638
-
1639
- if sensitivity is not None:
1640
- _details['sensitivity'] = sensitivity
1641
-
1642
- _details['requestType'] = 'INLINE'
1643
-
1644
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1645
- result = client.detect_anomalies(
1646
- detect_anomalies_details=_details,
1647
- **kwargs
1648
- )
1649
- cli_util.render_response(result, ctx)
1650
-
1651
-
1652
- @model_group.command(name=cli_util.override('anomaly_detection.detect_anomalies_embedded_detect_anomalies_request.command_name', 'detect-anomalies-embedded-detect-anomalies-request'), help=u"""Make a detect call with an anomaly model and detection data \n[Command Reference](detectAnomalies)""")
1653
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the trained model.""")
1654
- @cli_util.option('--content', required=True, help=u"""""")
1655
- @cli_util.option('--sensitivity', type=click.FLOAT, help=u"""Sensitivity of the algorithm to detect anomalies - higher the value, more anomalies get flagged. The value estimated during training is used by default. You can choose to provide a custom value.""")
1656
- @cli_util.option('--content-type', type=custom_types.CliCaseInsensitiveChoice(["CSV", "JSON"]), help=u"""""")
1657
- @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.""")
1658
- @json_skeleton_utils.get_cli_json_input_option({})
1659
- @cli_util.help_option
1660
- @click.pass_context
1661
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'AnomalyDetectResult'})
1662
- @cli_util.wrap_exceptions
1663
- def detect_anomalies_embedded_detect_anomalies_request(ctx, from_json, model_id, content, sensitivity, content_type, if_match):
1664
-
1665
- kwargs = {}
1666
- if if_match is not None:
1667
- kwargs['if_match'] = if_match
1668
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1669
-
1670
- _details = {}
1671
- _details['modelId'] = model_id
1672
- _details['content'] = content
1673
-
1674
- if sensitivity is not None:
1675
- _details['sensitivity'] = sensitivity
1676
-
1677
- if content_type is not None:
1678
- _details['contentType'] = content_type
1679
-
1680
- _details['requestType'] = 'BASE64_ENCODED'
1681
-
1682
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1683
- result = client.detect_anomalies(
1684
- detect_anomalies_details=_details,
1685
- **kwargs
1686
- )
1687
- cli_util.render_response(result, ctx)
1688
-
1689
-
1690
- @ai_private_endpoint_group.command(name=cli_util.override('anomaly_detection.get_ai_private_endpoint.command_name', 'get'), help=u"""Gets a specific private reverse connection by identifier. \n[Command Reference](getAiPrivateEndpoint)""")
1691
- @cli_util.option('--ai-private-endpoint-id', required=True, help=u"""Unique private reverse connection identifier.""")
1692
- @json_skeleton_utils.get_cli_json_input_option({})
1693
- @cli_util.help_option
1694
- @click.pass_context
1695
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'AiPrivateEndpoint'})
1696
- @cli_util.wrap_exceptions
1697
- def get_ai_private_endpoint(ctx, from_json, ai_private_endpoint_id):
1698
-
1699
- if isinstance(ai_private_endpoint_id, six.string_types) and len(ai_private_endpoint_id.strip()) == 0:
1700
- raise click.UsageError('Parameter --ai-private-endpoint-id cannot be whitespace or empty string')
1701
-
1702
- kwargs = {}
1703
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1704
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1705
- result = client.get_ai_private_endpoint(
1706
- ai_private_endpoint_id=ai_private_endpoint_id,
1707
- **kwargs
1708
- )
1709
- cli_util.render_response(result, ctx)
1710
-
1711
-
1712
- @data_asset_group.command(name=cli_util.override('anomaly_detection.get_data_asset.command_name', 'get'), help=u"""Gets a DataAsset by identifier \n[Command Reference](getDataAsset)""")
1713
- @cli_util.option('--data-asset-id', required=True, help=u"""The OCID of the Data Asset.""")
1714
- @json_skeleton_utils.get_cli_json_input_option({})
1715
- @cli_util.help_option
1716
- @click.pass_context
1717
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'DataAsset'})
1718
- @cli_util.wrap_exceptions
1719
- def get_data_asset(ctx, from_json, data_asset_id):
1720
-
1721
- if isinstance(data_asset_id, six.string_types) and len(data_asset_id.strip()) == 0:
1722
- raise click.UsageError('Parameter --data-asset-id cannot be whitespace or empty string')
1723
-
1724
- kwargs = {}
1725
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1726
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1727
- result = client.get_data_asset(
1728
- data_asset_id=data_asset_id,
1729
- **kwargs
1730
- )
1731
- cli_util.render_response(result, ctx)
1732
-
1733
-
1734
- @detect_anomaly_job_group.command(name=cli_util.override('anomaly_detection.get_detect_anomaly_job.command_name', 'get'), help=u"""Gets a detect anomaly asynchronous job by identifier. \n[Command Reference](getDetectAnomalyJob)""")
1735
- @cli_util.option('--detect-anomaly-job-id', required=True, help=u"""Unique asynchronous job identifier.""")
1736
- @json_skeleton_utils.get_cli_json_input_option({})
1737
- @cli_util.help_option
1738
- @click.pass_context
1739
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'DetectAnomalyJob'})
1740
- @cli_util.wrap_exceptions
1741
- def get_detect_anomaly_job(ctx, from_json, detect_anomaly_job_id):
1742
-
1743
- if isinstance(detect_anomaly_job_id, six.string_types) and len(detect_anomaly_job_id.strip()) == 0:
1744
- raise click.UsageError('Parameter --detect-anomaly-job-id cannot be whitespace or empty string')
1745
-
1746
- kwargs = {}
1747
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1748
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1749
- result = client.get_detect_anomaly_job(
1750
- detect_anomaly_job_id=detect_anomaly_job_id,
1751
- **kwargs
1752
- )
1753
- cli_util.render_response(result, ctx)
1754
-
1755
-
1756
- @model_group.command(name=cli_util.override('anomaly_detection.get_model.command_name', 'get'), help=u"""Gets a Model by identifier \n[Command Reference](getModel)""")
1757
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the Model.""")
1758
- @json_skeleton_utils.get_cli_json_input_option({})
1759
- @cli_util.help_option
1760
- @click.pass_context
1761
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'Model'})
1762
- @cli_util.wrap_exceptions
1763
- def get_model(ctx, from_json, model_id):
1764
-
1765
- if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
1766
- raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
1767
-
1768
- kwargs = {}
1769
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1770
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1771
- result = client.get_model(
1772
- model_id=model_id,
1773
- **kwargs
1774
- )
1775
- cli_util.render_response(result, ctx)
1776
-
1777
-
1778
- @project_group.command(name=cli_util.override('anomaly_detection.get_project.command_name', 'get'), help=u"""Gets a Project by identifier \n[Command Reference](getProject)""")
1779
- @cli_util.option('--project-id', required=True, help=u"""The OCID of the Project.""")
1780
- @json_skeleton_utils.get_cli_json_input_option({})
1781
- @cli_util.help_option
1782
- @click.pass_context
1783
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'Project'})
1784
- @cli_util.wrap_exceptions
1785
- def get_project(ctx, from_json, project_id):
1786
-
1787
- if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
1788
- raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
1789
-
1790
- kwargs = {}
1791
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1792
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1793
- result = client.get_project(
1794
- project_id=project_id,
1795
- **kwargs
1796
- )
1797
- cli_util.render_response(result, ctx)
1798
-
1799
-
1800
- @work_request_group.command(name=cli_util.override('anomaly_detection.get_work_request.command_name', 'get'), help=u"""Gets the status of the work request with the given ID. \n[Command Reference](getWorkRequest)""")
1801
- @cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
1802
- @json_skeleton_utils.get_cli_json_input_option({})
1803
- @cli_util.help_option
1804
- @click.pass_context
1805
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'WorkRequest'})
1806
- @cli_util.wrap_exceptions
1807
- def get_work_request(ctx, from_json, work_request_id):
1808
-
1809
- if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
1810
- raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
1811
-
1812
- kwargs = {}
1813
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1814
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1815
- result = client.get_work_request(
1816
- work_request_id=work_request_id,
1817
- **kwargs
1818
- )
1819
- cli_util.render_response(result, ctx)
1820
-
1821
-
1822
- @ai_private_endpoint_collection_group.command(name=cli_util.override('anomaly_detection.list_ai_private_endpoints.command_name', 'list-ai-private-endpoints'), help=u"""Returns a list of all the AI private endpoints in the specified compartment. \n[Command Reference](listAiPrivateEndpoints)""")
1823
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
1824
- @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""<b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.""")
1825
- @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""")
1826
- @cli_util.option('--id', help=u"""unique AiPrivateEndpoint identifier""")
1827
- @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
1828
- @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.""")
1829
- @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
1830
- @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.""")
1831
- @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.""")
1832
- @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.""")
1833
- @json_skeleton_utils.get_cli_json_input_option({})
1834
- @cli_util.help_option
1835
- @click.pass_context
1836
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'AiPrivateEndpointCollection'})
1837
- @cli_util.wrap_exceptions
1838
- def list_ai_private_endpoints(ctx, from_json, all_pages, page_size, compartment_id, lifecycle_state, display_name, id, limit, page, sort_order, sort_by):
1839
-
1840
- if all_pages and limit:
1841
- raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
1842
-
1843
- kwargs = {}
1844
- if lifecycle_state is not None:
1845
- kwargs['lifecycle_state'] = lifecycle_state
1846
- if display_name is not None:
1847
- kwargs['display_name'] = display_name
1848
- if id is not None:
1849
- kwargs['id'] = id
1850
- if limit is not None:
1851
- kwargs['limit'] = limit
1852
- if page is not None:
1853
- kwargs['page'] = page
1854
- if sort_order is not None:
1855
- kwargs['sort_order'] = sort_order
1856
- if sort_by is not None:
1857
- kwargs['sort_by'] = sort_by
1858
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1859
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1860
- if all_pages:
1861
- if page_size:
1862
- kwargs['limit'] = page_size
1863
-
1864
- result = cli_util.list_call_get_all_results(
1865
- client.list_ai_private_endpoints,
1866
- compartment_id=compartment_id,
1867
- **kwargs
1868
- )
1869
- elif limit is not None:
1870
- result = cli_util.list_call_get_up_to_limit(
1871
- client.list_ai_private_endpoints,
1872
- limit,
1873
- page_size,
1874
- compartment_id=compartment_id,
1875
- **kwargs
1876
- )
1877
- else:
1878
- result = client.list_ai_private_endpoints(
1879
- compartment_id=compartment_id,
1880
- **kwargs
1881
- )
1882
- cli_util.render_response(result, ctx)
1883
-
1884
-
1885
- @data_asset_collection_group.command(name=cli_util.override('anomaly_detection.list_data_assets.command_name', 'list-data-assets'), help=u"""Returns a list of DataAssets. \n[Command Reference](listDataAssets)""")
1886
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
1887
- @cli_util.option('--project-id', help=u"""The ID of the project for which to list the objects.""")
1888
- @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""")
1889
- @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
1890
- @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.""")
1891
- @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), help=u"""<b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.""")
1892
- @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
1893
- @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.""")
1894
- @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.""")
1895
- @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.""")
1896
- @json_skeleton_utils.get_cli_json_input_option({})
1897
- @cli_util.help_option
1898
- @click.pass_context
1899
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'DataAssetCollection'})
1900
- @cli_util.wrap_exceptions
1901
- def list_data_assets(ctx, from_json, all_pages, page_size, compartment_id, project_id, display_name, limit, page, lifecycle_state, sort_order, sort_by):
1902
-
1903
- if all_pages and limit:
1904
- raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
1905
-
1906
- kwargs = {}
1907
- if project_id is not None:
1908
- kwargs['project_id'] = project_id
1909
- if display_name is not None:
1910
- kwargs['display_name'] = display_name
1911
- if limit is not None:
1912
- kwargs['limit'] = limit
1913
- if page is not None:
1914
- kwargs['page'] = page
1915
- if lifecycle_state is not None:
1916
- kwargs['lifecycle_state'] = lifecycle_state
1917
- if sort_order is not None:
1918
- kwargs['sort_order'] = sort_order
1919
- if sort_by is not None:
1920
- kwargs['sort_by'] = sort_by
1921
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1922
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1923
- if all_pages:
1924
- if page_size:
1925
- kwargs['limit'] = page_size
1926
-
1927
- result = cli_util.list_call_get_all_results(
1928
- client.list_data_assets,
1929
- compartment_id=compartment_id,
1930
- **kwargs
1931
- )
1932
- elif limit is not None:
1933
- result = cli_util.list_call_get_up_to_limit(
1934
- client.list_data_assets,
1935
- limit,
1936
- page_size,
1937
- compartment_id=compartment_id,
1938
- **kwargs
1939
- )
1940
- else:
1941
- result = client.list_data_assets(
1942
- compartment_id=compartment_id,
1943
- **kwargs
1944
- )
1945
- cli_util.render_response(result, ctx)
1946
-
1947
-
1948
- @detect_anomaly_job_collection_group.command(name=cli_util.override('anomaly_detection.list_detect_anomaly_jobs.command_name', 'list-detect-anomaly-jobs'), help=u"""Returns a list of all the Anomaly Detection jobs in the specified compartment. \n[Command Reference](listDetectAnomalyJobs)""")
1949
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
1950
- @cli_util.option('--model-id', help=u"""The ID of the trained model for which to list the resources.""")
1951
- @cli_util.option('--project-id', help=u"""The ID of the project for which to list the objects.""")
1952
- @cli_util.option('--detect-anomaly-job-id', help=u"""Unique Async Job identifier""")
1953
- @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "PARTIALLY_SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS"]), help=u"""<b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.""")
1954
- @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""")
1955
- @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
1956
- @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.""")
1957
- @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
1958
- @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.""")
1959
- @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.""")
1960
- @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.""")
1961
- @json_skeleton_utils.get_cli_json_input_option({})
1962
- @cli_util.help_option
1963
- @click.pass_context
1964
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'DetectAnomalyJobCollection'})
1965
- @cli_util.wrap_exceptions
1966
- def list_detect_anomaly_jobs(ctx, from_json, all_pages, page_size, compartment_id, model_id, project_id, detect_anomaly_job_id, lifecycle_state, display_name, limit, page, sort_order, sort_by):
1967
-
1968
- if all_pages and limit:
1969
- raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
1970
-
1971
- kwargs = {}
1972
- if model_id is not None:
1973
- kwargs['model_id'] = model_id
1974
- if project_id is not None:
1975
- kwargs['project_id'] = project_id
1976
- if detect_anomaly_job_id is not None:
1977
- kwargs['detect_anomaly_job_id'] = detect_anomaly_job_id
1978
- if lifecycle_state is not None:
1979
- kwargs['lifecycle_state'] = lifecycle_state
1980
- if display_name is not None:
1981
- kwargs['display_name'] = display_name
1982
- if limit is not None:
1983
- kwargs['limit'] = limit
1984
- if page is not None:
1985
- kwargs['page'] = page
1986
- if sort_order is not None:
1987
- kwargs['sort_order'] = sort_order
1988
- if sort_by is not None:
1989
- kwargs['sort_by'] = sort_by
1990
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1991
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
1992
- if all_pages:
1993
- if page_size:
1994
- kwargs['limit'] = page_size
1995
-
1996
- result = cli_util.list_call_get_all_results(
1997
- client.list_detect_anomaly_jobs,
1998
- compartment_id=compartment_id,
1999
- **kwargs
2000
- )
2001
- elif limit is not None:
2002
- result = cli_util.list_call_get_up_to_limit(
2003
- client.list_detect_anomaly_jobs,
2004
- limit,
2005
- page_size,
2006
- compartment_id=compartment_id,
2007
- **kwargs
2008
- )
2009
- else:
2010
- result = client.list_detect_anomaly_jobs(
2011
- compartment_id=compartment_id,
2012
- **kwargs
2013
- )
2014
- cli_util.render_response(result, ctx)
2015
-
2016
-
2017
- @model_group.command(name=cli_util.override('anomaly_detection.list_models.command_name', 'list'), help=u"""Returns a list of Models. \n[Command Reference](listModels)""")
2018
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
2019
- @cli_util.option('--project-id', help=u"""The ID of the project for which to list the objects.""")
2020
- @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["DELETING", "DELETED", "FAILED", "CREATING", "ACTIVE", "UPDATING"]), help=u"""<b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.""")
2021
- @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""")
2022
- @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
2023
- @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.""")
2024
- @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
2025
- @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""Specifies the field to sort by. Accepts only one field. By default, when you sort by `timeCreated`, the results are shown in descending order. When you sort by `displayName`, the results are shown in ascending order. Sort order for the `displayName` field is case sensitive.""")
2026
- @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.""")
2027
- @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.""")
2028
- @json_skeleton_utils.get_cli_json_input_option({})
2029
- @cli_util.help_option
2030
- @click.pass_context
2031
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'ModelCollection'})
2032
- @cli_util.wrap_exceptions
2033
- def list_models(ctx, from_json, all_pages, page_size, compartment_id, project_id, lifecycle_state, display_name, limit, page, sort_order, sort_by):
2034
-
2035
- if all_pages and limit:
2036
- raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
2037
-
2038
- kwargs = {}
2039
- if project_id is not None:
2040
- kwargs['project_id'] = project_id
2041
- if lifecycle_state is not None:
2042
- kwargs['lifecycle_state'] = lifecycle_state
2043
- if display_name is not None:
2044
- kwargs['display_name'] = display_name
2045
- if limit is not None:
2046
- kwargs['limit'] = limit
2047
- if page is not None:
2048
- kwargs['page'] = page
2049
- if sort_order is not None:
2050
- kwargs['sort_order'] = sort_order
2051
- if sort_by is not None:
2052
- kwargs['sort_by'] = sort_by
2053
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2054
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2055
- if all_pages:
2056
- if page_size:
2057
- kwargs['limit'] = page_size
2058
-
2059
- result = cli_util.list_call_get_all_results(
2060
- client.list_models,
2061
- compartment_id=compartment_id,
2062
- **kwargs
2063
- )
2064
- elif limit is not None:
2065
- result = cli_util.list_call_get_up_to_limit(
2066
- client.list_models,
2067
- limit,
2068
- page_size,
2069
- compartment_id=compartment_id,
2070
- **kwargs
2071
- )
2072
- else:
2073
- result = client.list_models(
2074
- compartment_id=compartment_id,
2075
- **kwargs
2076
- )
2077
- cli_util.render_response(result, ctx)
2078
-
2079
-
2080
- @project_group.command(name=cli_util.override('anomaly_detection.list_projects.command_name', 'list'), help=u"""Returns a list of Projects. \n[Command Reference](listProjects)""")
2081
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
2082
- @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "CREATING", "FAILED", "DELETING", "DELETED", "UPDATING"]), help=u"""<b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.""")
2083
- @cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire display name given.""")
2084
- @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
2085
- @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.""")
2086
- @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
2087
- @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""Specifies the field to sort by. Accepts only one field. By default, when you sort by `timeCreated`, the results are shown in descending order. When you sort by `displayName`, the results are shown in ascending order. Sort order for the `displayName` field is case sensitive.""")
2088
- @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.""")
2089
- @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.""")
2090
- @json_skeleton_utils.get_cli_json_input_option({})
2091
- @cli_util.help_option
2092
- @click.pass_context
2093
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'ProjectCollection'})
2094
- @cli_util.wrap_exceptions
2095
- def list_projects(ctx, from_json, all_pages, page_size, compartment_id, lifecycle_state, display_name, limit, page, sort_order, sort_by):
2096
-
2097
- if all_pages and limit:
2098
- raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
2099
-
2100
- kwargs = {}
2101
- if lifecycle_state is not None:
2102
- kwargs['lifecycle_state'] = lifecycle_state
2103
- if display_name is not None:
2104
- kwargs['display_name'] = display_name
2105
- if limit is not None:
2106
- kwargs['limit'] = limit
2107
- if page is not None:
2108
- kwargs['page'] = page
2109
- if sort_order is not None:
2110
- kwargs['sort_order'] = sort_order
2111
- if sort_by is not None:
2112
- kwargs['sort_by'] = sort_by
2113
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2114
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2115
- if all_pages:
2116
- if page_size:
2117
- kwargs['limit'] = page_size
2118
-
2119
- result = cli_util.list_call_get_all_results(
2120
- client.list_projects,
2121
- compartment_id=compartment_id,
2122
- **kwargs
2123
- )
2124
- elif limit is not None:
2125
- result = cli_util.list_call_get_up_to_limit(
2126
- client.list_projects,
2127
- limit,
2128
- page_size,
2129
- compartment_id=compartment_id,
2130
- **kwargs
2131
- )
2132
- else:
2133
- result = client.list_projects(
2134
- compartment_id=compartment_id,
2135
- **kwargs
2136
- )
2137
- cli_util.render_response(result, ctx)
2138
-
2139
-
2140
- @work_request_error_group.command(name=cli_util.override('anomaly_detection.list_work_request_errors.command_name', 'list'), help=u"""Return a (paginated) list of errors for a given work request. \n[Command Reference](listWorkRequestErrors)""")
2141
- @cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
2142
- @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.""")
2143
- @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
2144
- @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.""")
2145
- @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.""")
2146
- @json_skeleton_utils.get_cli_json_input_option({})
2147
- @cli_util.help_option
2148
- @click.pass_context
2149
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'WorkRequestErrorCollection'})
2150
- @cli_util.wrap_exceptions
2151
- def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_id, page, limit):
2152
-
2153
- if all_pages and limit:
2154
- raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
2155
-
2156
- if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
2157
- raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
2158
-
2159
- kwargs = {}
2160
- if page is not None:
2161
- kwargs['page'] = page
2162
- if limit is not None:
2163
- kwargs['limit'] = limit
2164
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2165
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2166
- if all_pages:
2167
- if page_size:
2168
- kwargs['limit'] = page_size
2169
-
2170
- result = cli_util.list_call_get_all_results(
2171
- client.list_work_request_errors,
2172
- work_request_id=work_request_id,
2173
- **kwargs
2174
- )
2175
- elif limit is not None:
2176
- result = cli_util.list_call_get_up_to_limit(
2177
- client.list_work_request_errors,
2178
- limit,
2179
- page_size,
2180
- work_request_id=work_request_id,
2181
- **kwargs
2182
- )
2183
- else:
2184
- result = client.list_work_request_errors(
2185
- work_request_id=work_request_id,
2186
- **kwargs
2187
- )
2188
- cli_util.render_response(result, ctx)
2189
-
2190
-
2191
- @work_request_log_entry_group.command(name=cli_util.override('anomaly_detection.list_work_request_logs.command_name', 'list-work-request-logs'), help=u"""Return a (paginated) list of logs for a given work request. \n[Command Reference](listWorkRequestLogs)""")
2192
- @cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
2193
- @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.""")
2194
- @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
2195
- @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.""")
2196
- @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.""")
2197
- @json_skeleton_utils.get_cli_json_input_option({})
2198
- @cli_util.help_option
2199
- @click.pass_context
2200
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'WorkRequestLogEntryCollection'})
2201
- @cli_util.wrap_exceptions
2202
- def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id, page, limit):
2203
-
2204
- if all_pages and limit:
2205
- raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
2206
-
2207
- if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
2208
- raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
2209
-
2210
- kwargs = {}
2211
- if page is not None:
2212
- kwargs['page'] = page
2213
- if limit is not None:
2214
- kwargs['limit'] = limit
2215
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2216
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2217
- if all_pages:
2218
- if page_size:
2219
- kwargs['limit'] = page_size
2220
-
2221
- result = cli_util.list_call_get_all_results(
2222
- client.list_work_request_logs,
2223
- work_request_id=work_request_id,
2224
- **kwargs
2225
- )
2226
- elif limit is not None:
2227
- result = cli_util.list_call_get_up_to_limit(
2228
- client.list_work_request_logs,
2229
- limit,
2230
- page_size,
2231
- work_request_id=work_request_id,
2232
- **kwargs
2233
- )
2234
- else:
2235
- result = client.list_work_request_logs(
2236
- work_request_id=work_request_id,
2237
- **kwargs
2238
- )
2239
- cli_util.render_response(result, ctx)
2240
-
2241
-
2242
- @work_request_group.command(name=cli_util.override('anomaly_detection.list_work_requests.command_name', 'list'), help=u"""Lists the work requests in a compartment. \n[Command Reference](listWorkRequests)""")
2243
- @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
2244
- @cli_util.option('--work-request-id', help=u"""The ID of the asynchronous work request.""")
2245
- @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.""")
2246
- @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
2247
- @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.""")
2248
- @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.""")
2249
- @json_skeleton_utils.get_cli_json_input_option({})
2250
- @cli_util.help_option
2251
- @click.pass_context
2252
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'WorkRequestSummaryCollection'})
2253
- @cli_util.wrap_exceptions
2254
- def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, work_request_id, page, limit):
2255
-
2256
- if all_pages and limit:
2257
- raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
2258
-
2259
- kwargs = {}
2260
- if work_request_id is not None:
2261
- kwargs['work_request_id'] = work_request_id
2262
- if page is not None:
2263
- kwargs['page'] = page
2264
- if limit is not None:
2265
- kwargs['limit'] = limit
2266
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2267
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2268
- if all_pages:
2269
- if page_size:
2270
- kwargs['limit'] = page_size
2271
-
2272
- result = cli_util.list_call_get_all_results(
2273
- client.list_work_requests,
2274
- compartment_id=compartment_id,
2275
- **kwargs
2276
- )
2277
- elif limit is not None:
2278
- result = cli_util.list_call_get_up_to_limit(
2279
- client.list_work_requests,
2280
- limit,
2281
- page_size,
2282
- compartment_id=compartment_id,
2283
- **kwargs
2284
- )
2285
- else:
2286
- result = client.list_work_requests(
2287
- compartment_id=compartment_id,
2288
- **kwargs
2289
- )
2290
- cli_util.render_response(result, ctx)
2291
-
2292
-
2293
- @ai_private_endpoint_group.command(name=cli_util.override('anomaly_detection.update_ai_private_endpoint.command_name', 'update'), help=u"""Updates the private reverse connection endpoint. \n[Command Reference](updateAiPrivateEndpoint)""")
2294
- @cli_util.option('--ai-private-endpoint-id', required=True, help=u"""Unique private reverse connection identifier.""")
2295
- @cli_util.option('--dns-zones', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of DNS zones to be used by the data assets. Example: custpvtsubnet.oraclevcn.com for data asset: db.custpvtsubnet.oraclevcn.com""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2296
- @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)
2297
- @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)
2298
- @cli_util.option('--display-name', help=u"""Display name of the private endpoint resource.""")
2299
- @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.""")
2300
- @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2301
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED"]), 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.""")
2302
- @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.""")
2303
- @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.""")
2304
- @json_skeleton_utils.get_cli_json_input_option({'dns-zones': {'module': 'ai_anomaly_detection', 'class': 'list[string]'}, 'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
2305
- @cli_util.help_option
2306
- @click.pass_context
2307
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'dns-zones': {'module': 'ai_anomaly_detection', 'class': 'list[string]'}, 'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
2308
- @cli_util.wrap_exceptions
2309
- def update_ai_private_endpoint(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, ai_private_endpoint_id, dns_zones, freeform_tags, defined_tags, display_name, if_match):
2310
-
2311
- if isinstance(ai_private_endpoint_id, six.string_types) and len(ai_private_endpoint_id.strip()) == 0:
2312
- raise click.UsageError('Parameter --ai-private-endpoint-id cannot be whitespace or empty string')
2313
- if not force:
2314
- if dns_zones or freeform_tags or defined_tags:
2315
- if not click.confirm("WARNING: Updates to dns-zones and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
2316
- ctx.abort()
2317
-
2318
- kwargs = {}
2319
- if if_match is not None:
2320
- kwargs['if_match'] = if_match
2321
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2322
-
2323
- _details = {}
2324
-
2325
- if dns_zones is not None:
2326
- _details['dnsZones'] = cli_util.parse_json_parameter("dns_zones", dns_zones)
2327
-
2328
- if freeform_tags is not None:
2329
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2330
-
2331
- if defined_tags is not None:
2332
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
2333
-
2334
- if display_name is not None:
2335
- _details['displayName'] = display_name
2336
-
2337
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2338
- result = client.update_ai_private_endpoint(
2339
- ai_private_endpoint_id=ai_private_endpoint_id,
2340
- update_ai_private_endpoint_details=_details,
2341
- **kwargs
2342
- )
2343
- if wait_for_state:
2344
-
2345
- if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
2346
- try:
2347
- wait_period_kwargs = {}
2348
- if max_wait_seconds is not None:
2349
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2350
- if wait_interval_seconds is not None:
2351
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2352
- if 'opc-work-request-id' not in result.headers:
2353
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
2354
- cli_util.render_response(result, ctx)
2355
- return
2356
-
2357
- click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
2358
- result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
2359
- except oci.exceptions.MaximumWaitTimeExceeded as e:
2360
- # If we fail, we should show an error, but we should still provide the information to the customer
2361
- click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
2362
- cli_util.render_response(result, ctx)
2363
- sys.exit(2)
2364
- except Exception:
2365
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
2366
- cli_util.render_response(result, ctx)
2367
- raise
2368
- else:
2369
- click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
2370
- cli_util.render_response(result, ctx)
2371
-
2372
-
2373
- @data_asset_group.command(name=cli_util.override('anomaly_detection.update_data_asset.command_name', 'update'), help=u"""Updates the DataAsset \n[Command Reference](updateDataAsset)""")
2374
- @cli_util.option('--data-asset-id', required=True, help=u"""The OCID of the Data Asset.""")
2375
- @cli_util.option('--display-name', help=u"""DataAsset Identifier""")
2376
- @cli_util.option('--description', help=u"""DataAsset description""")
2377
- @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)
2378
- @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)
2379
- @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.""")
2380
- @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2381
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), 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.""")
2382
- @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.""")
2383
- @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.""")
2384
- @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
2385
- @cli_util.help_option
2386
- @click.pass_context
2387
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'DataAsset'})
2388
- @cli_util.wrap_exceptions
2389
- def update_data_asset(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, data_asset_id, display_name, description, freeform_tags, defined_tags, if_match):
2390
-
2391
- if isinstance(data_asset_id, six.string_types) and len(data_asset_id.strip()) == 0:
2392
- raise click.UsageError('Parameter --data-asset-id cannot be whitespace or empty string')
2393
- if not force:
2394
- if freeform_tags or defined_tags:
2395
- if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
2396
- ctx.abort()
2397
-
2398
- kwargs = {}
2399
- if if_match is not None:
2400
- kwargs['if_match'] = if_match
2401
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2402
-
2403
- _details = {}
2404
-
2405
- if display_name is not None:
2406
- _details['displayName'] = display_name
2407
-
2408
- if description is not None:
2409
- _details['description'] = description
2410
-
2411
- if freeform_tags is not None:
2412
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2413
-
2414
- if defined_tags is not None:
2415
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
2416
-
2417
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2418
- result = client.update_data_asset(
2419
- data_asset_id=data_asset_id,
2420
- update_data_asset_details=_details,
2421
- **kwargs
2422
- )
2423
- if wait_for_state:
2424
-
2425
- if hasattr(client, 'get_data_asset') and callable(getattr(client, 'get_data_asset')):
2426
- try:
2427
- wait_period_kwargs = {}
2428
- if max_wait_seconds is not None:
2429
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2430
- if wait_interval_seconds is not None:
2431
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2432
-
2433
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
2434
- result = oci.wait_until(client, client.get_data_asset(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
2435
- except oci.exceptions.MaximumWaitTimeExceeded as e:
2436
- # If we fail, we should show an error, but we should still provide the information to the customer
2437
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
2438
- cli_util.render_response(result, ctx)
2439
- sys.exit(2)
2440
- except Exception:
2441
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
2442
- cli_util.render_response(result, ctx)
2443
- raise
2444
- else:
2445
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
2446
- cli_util.render_response(result, ctx)
2447
-
2448
-
2449
- @detect_anomaly_job_group.command(name=cli_util.override('anomaly_detection.update_detect_anomaly_job.command_name', 'update'), help=u"""Updates the detect anomaly asynchronous job by identifier. \n[Command Reference](updateDetectAnomalyJob)""")
2450
- @cli_util.option('--detect-anomaly-job-id', required=True, help=u"""Unique asynchronous job identifier.""")
2451
- @cli_util.option('--description', help=u"""A short description of the detect anomaly job.""")
2452
- @cli_util.option('--display-name', help=u"""Detect anomaly job display name.""")
2453
- @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.""")
2454
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "PARTIALLY_SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS"]), 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.""")
2455
- @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.""")
2456
- @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.""")
2457
- @json_skeleton_utils.get_cli_json_input_option({})
2458
- @cli_util.help_option
2459
- @click.pass_context
2460
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_anomaly_detection', 'class': 'DetectAnomalyJob'})
2461
- @cli_util.wrap_exceptions
2462
- def update_detect_anomaly_job(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, detect_anomaly_job_id, description, display_name, if_match):
2463
-
2464
- if isinstance(detect_anomaly_job_id, six.string_types) and len(detect_anomaly_job_id.strip()) == 0:
2465
- raise click.UsageError('Parameter --detect-anomaly-job-id cannot be whitespace or empty string')
2466
-
2467
- kwargs = {}
2468
- if if_match is not None:
2469
- kwargs['if_match'] = if_match
2470
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2471
-
2472
- _details = {}
2473
-
2474
- if description is not None:
2475
- _details['description'] = description
2476
-
2477
- if display_name is not None:
2478
- _details['displayName'] = display_name
2479
-
2480
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2481
- result = client.update_detect_anomaly_job(
2482
- detect_anomaly_job_id=detect_anomaly_job_id,
2483
- update_detect_anomaly_job_details=_details,
2484
- **kwargs
2485
- )
2486
- if wait_for_state:
2487
-
2488
- if hasattr(client, 'get_detect_anomaly_job') and callable(getattr(client, 'get_detect_anomaly_job')):
2489
- try:
2490
- wait_period_kwargs = {}
2491
- if max_wait_seconds is not None:
2492
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2493
- if wait_interval_seconds is not None:
2494
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2495
-
2496
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
2497
- result = oci.wait_until(client, client.get_detect_anomaly_job(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
2498
- except oci.exceptions.MaximumWaitTimeExceeded as e:
2499
- # If we fail, we should show an error, but we should still provide the information to the customer
2500
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
2501
- cli_util.render_response(result, ctx)
2502
- sys.exit(2)
2503
- except Exception:
2504
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
2505
- cli_util.render_response(result, ctx)
2506
- raise
2507
- else:
2508
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
2509
- cli_util.render_response(result, ctx)
2510
-
2511
-
2512
- @model_group.command(name=cli_util.override('anomaly_detection.update_model.command_name', 'update'), help=u"""Updates the Model \n[Command Reference](updateModel)""")
2513
- @cli_util.option('--model-id', required=True, help=u"""The OCID of the Model.""")
2514
- @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.""")
2515
- @cli_util.option('--description', help=u"""A short description of the ai model.""")
2516
- @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)
2517
- @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)
2518
- @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.""")
2519
- @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2520
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "WAITING", "SUCCEEDED", "CANCELING", "CANCELED"]), 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.""")
2521
- @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.""")
2522
- @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.""")
2523
- @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
2524
- @cli_util.help_option
2525
- @click.pass_context
2526
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
2527
- @cli_util.wrap_exceptions
2528
- def update_model(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, model_id, display_name, description, freeform_tags, defined_tags, if_match):
2529
-
2530
- if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
2531
- raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
2532
- if not force:
2533
- if freeform_tags or defined_tags:
2534
- if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
2535
- ctx.abort()
2536
-
2537
- kwargs = {}
2538
- if if_match is not None:
2539
- kwargs['if_match'] = if_match
2540
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2541
-
2542
- _details = {}
2543
-
2544
- if display_name is not None:
2545
- _details['displayName'] = display_name
2546
-
2547
- if description is not None:
2548
- _details['description'] = description
2549
-
2550
- if freeform_tags is not None:
2551
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2552
-
2553
- if defined_tags is not None:
2554
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
2555
-
2556
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2557
- result = client.update_model(
2558
- model_id=model_id,
2559
- update_model_details=_details,
2560
- **kwargs
2561
- )
2562
- if wait_for_state:
2563
-
2564
- if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
2565
- try:
2566
- wait_period_kwargs = {}
2567
- if max_wait_seconds is not None:
2568
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2569
- if wait_interval_seconds is not None:
2570
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2571
- if 'opc-work-request-id' not in result.headers:
2572
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
2573
- cli_util.render_response(result, ctx)
2574
- return
2575
-
2576
- click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
2577
- result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
2578
- except oci.exceptions.MaximumWaitTimeExceeded as e:
2579
- # If we fail, we should show an error, but we should still provide the information to the customer
2580
- click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
2581
- cli_util.render_response(result, ctx)
2582
- sys.exit(2)
2583
- except Exception:
2584
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
2585
- cli_util.render_response(result, ctx)
2586
- raise
2587
- else:
2588
- click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
2589
- cli_util.render_response(result, ctx)
2590
-
2591
-
2592
- @project_group.command(name=cli_util.override('anomaly_detection.update_project.command_name', 'update'), help=u"""Updates the Project \n[Command Reference](updateProject)""")
2593
- @cli_util.option('--project-id', required=True, help=u"""The OCID of the Project.""")
2594
- @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.""")
2595
- @cli_util.option('--description', help=u"""A short description of the project.""")
2596
- @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)
2597
- @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)
2598
- @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.""")
2599
- @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2600
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "CREATING", "FAILED", "DELETING", "DELETED", "UPDATING"]), 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.""")
2601
- @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.""")
2602
- @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.""")
2603
- @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}})
2604
- @cli_util.help_option
2605
- @click.pass_context
2606
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_anomaly_detection', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_anomaly_detection', 'class': 'Project'})
2607
- @cli_util.wrap_exceptions
2608
- def update_project(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, project_id, display_name, description, freeform_tags, defined_tags, if_match):
2609
-
2610
- if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
2611
- raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
2612
- if not force:
2613
- if freeform_tags or defined_tags:
2614
- if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
2615
- ctx.abort()
2616
-
2617
- kwargs = {}
2618
- if if_match is not None:
2619
- kwargs['if_match'] = if_match
2620
- kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2621
-
2622
- _details = {}
2623
-
2624
- if display_name is not None:
2625
- _details['displayName'] = display_name
2626
-
2627
- if description is not None:
2628
- _details['description'] = description
2629
-
2630
- if freeform_tags is not None:
2631
- _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2632
-
2633
- if defined_tags is not None:
2634
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
2635
-
2636
- client = cli_util.build_client('ai_anomaly_detection', 'anomaly_detection', ctx)
2637
- result = client.update_project(
2638
- project_id=project_id,
2639
- update_project_details=_details,
2640
- **kwargs
2641
- )
2642
- if wait_for_state:
2643
-
2644
- if hasattr(client, 'get_project') and callable(getattr(client, 'get_project')):
2645
- try:
2646
- wait_period_kwargs = {}
2647
- if max_wait_seconds is not None:
2648
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2649
- if wait_interval_seconds is not None:
2650
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2651
-
2652
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
2653
- result = oci.wait_until(client, client.get_project(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
2654
- except oci.exceptions.MaximumWaitTimeExceeded as e:
2655
- # If we fail, we should show an error, but we should still provide the information to the customer
2656
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
2657
- cli_util.render_response(result, ctx)
2658
- sys.exit(2)
2659
- except Exception:
2660
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
2661
- cli_util.render_response(result, ctx)
2662
- raise
2663
- else:
2664
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
2665
- cli_util.render_response(result, ctx)