oci-cli 3.63.0__py3-none-any.whl → 3.63.2__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 (187) hide show
  1. oci_cli/bin/devops.psm1 +5 -4
  2. oci_cli/bin/psql.psm1 +4 -4
  3. oci_cli/bin/vault.psm1 +3 -3
  4. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/add-lock.txt +141 -0
  5. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/change-compartment.txt +4 -0
  6. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/create.txt +17 -0
  7. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/delete.txt +4 -0
  8. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/remove-lock.txt +136 -0
  9. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/update.txt +4 -0
  10. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api.txt +4 -0
  11. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/add-lock.txt +143 -0
  12. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/change-compartment.txt +4 -0
  13. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/create.txt +17 -0
  14. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/delete.txt +4 -0
  15. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/remove-lock.txt +138 -0
  16. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/update.txt +4 -0
  17. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate.txt +4 -0
  18. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/add-lock.txt +150 -0
  19. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/change-compartment.txt +4 -0
  20. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/create.txt +17 -0
  21. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/delete.txt +4 -0
  22. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/remove-lock.txt +145 -0
  23. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/update.txt +4 -0
  24. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment.txt +4 -0
  25. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/add-lock.txt +142 -0
  26. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/change-compartment.txt +4 -0
  27. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/create.txt +18 -1
  28. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/delete.txt +4 -0
  29. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/remove-lock.txt +137 -0
  30. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/update.txt +5 -1
  31. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway.txt +4 -0
  32. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/add-lock.txt +144 -0
  33. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/create.txt +17 -0
  34. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/delete.txt +4 -0
  35. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/list.txt +4 -2
  36. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/remove-lock.txt +139 -0
  37. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/update.txt +4 -0
  38. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk.txt +4 -0
  39. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/add-lock.txt +147 -0
  40. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/change-compartment.txt +4 -0
  41. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/create.txt +17 -0
  42. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/delete.txt +4 -0
  43. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/remove-lock.txt +142 -0
  44. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/update.txt +4 -0
  45. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber.txt +4 -0
  46. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/add-lock.txt +146 -0
  47. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/change-compartment.txt +4 -0
  48. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/create.txt +17 -0
  49. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/delete.txt +4 -0
  50. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/remove-lock.txt +141 -0
  51. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/update.txt +4 -0
  52. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan.txt +4 -0
  53. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway.txt +28 -0
  54. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/change-compartment.txt +108 -0
  55. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/create.txt +153 -0
  56. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/delete.txt +132 -0
  57. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/get.txt +94 -0
  58. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/update.txt +162 -0
  59. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance-collection/list-api-platform-instances.txt +141 -0
  60. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance-collection.txt +15 -0
  61. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance.txt +23 -0
  62. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request/get.txt +91 -0
  63. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request/list.txt +140 -0
  64. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request-error/list.txt +131 -0
  65. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request-error.txt +15 -0
  66. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request-log-entry/list-work-request-logs.txt +131 -0
  67. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request-log-entry.txt +15 -0
  68. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request.txt +21 -0
  69. oci_cli/help_text_producer/data_files/text/cmdref/api-platform.txt +42 -0
  70. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config/create-agent.txt +153 -0
  71. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config/create-macs-extension.txt +171 -0
  72. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config/update-agent.txt +162 -0
  73. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config/update-macs-extension.txt +174 -0
  74. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config-collection/list.txt +2 -1
  75. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config.txt +8 -0
  76. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/match-agents-with-attribute-key/get.txt +91 -0
  77. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/match-agents-with-attribute-key/update.txt +107 -0
  78. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/match-agents-with-attribute-key.txt +16 -0
  79. oci_cli/help_text_producer/data_files/text/cmdref/apm-config.txt +14 -0
  80. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment/create-model-deployment-model-group-deployment-configuration-details.txt +215 -0
  81. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment/update-model-deployment-update-model-group-deployment-configuration-details.txt +235 -0
  82. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment-model-state/list.txt +167 -0
  83. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment-model-state.txt +14 -0
  84. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment.txt +5 -0
  85. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/activate.txt +130 -0
  86. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/change-compartment.txt +108 -0
  87. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/create-model-group-artifact.txt +123 -0
  88. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/create-model-group-clone-model-group-details.txt +139 -0
  89. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/create-model-group-create-model-group-details.txt +197 -0
  90. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/create.txt +132 -0
  91. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/deactivate.txt +130 -0
  92. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/delete.txt +134 -0
  93. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/get-model-group-artifact-content.txt +107 -0
  94. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/get.txt +97 -0
  95. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/head-model-group-artifact.txt +96 -0
  96. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/list-model-group-models.txt +171 -0
  97. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/list.txt +169 -0
  98. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/update.txt +180 -0
  99. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/change-compartment.txt +108 -0
  100. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/create.txt +166 -0
  101. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/delete.txt +133 -0
  102. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/get.txt +95 -0
  103. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/list.txt +165 -0
  104. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/update.txt +172 -0
  105. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history.txt +25 -0
  106. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group.txt +41 -0
  107. oci_cli/help_text_producer/data_files/text/cmdref/data-science/work-request/list.txt +1 -1
  108. oci_cli/help_text_producer/data_files/text/cmdref/data-science.txt +54 -0
  109. oci_cli/help_text_producer/data_files/text/cmdref/devops/{protected-branch → protected-branch-collection}/list-protected-branches.txt +2 -2
  110. oci_cli/help_text_producer/data_files/text/cmdref/devops/protected-branch-collection.txt +14 -0
  111. oci_cli/help_text_producer/data_files/text/cmdref/devops/protected-branch.txt +0 -2
  112. oci_cli/help_text_producer/data_files/text/cmdref/devops.txt +2 -0
  113. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection/create-amazon-s3-connection.txt +9 -9
  114. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection/{create-connection-create-iceberg-connection-details.txt → create-iceberg-connection.txt} +9 -9
  115. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection/update-amazon-s3-connection.txt +9 -9
  116. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection/{update-connection-update-iceberg-connection-details.txt → update-iceberg-connection.txt} +5 -5
  117. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection.txt +4 -4
  118. oci_cli/help_text_producer/data_files/text/cmdref/goldengate.txt +4 -4
  119. oci_cli/help_text_producer/data_files/text/cmdref/lfs/lustre-file-system.txt +1 -1
  120. oci_cli/help_text_producer/data_files/text/cmdref/lfs.txt +1 -2
  121. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/dashboard/get-oob.txt +3 -2
  122. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/dashboard/import.txt +24 -0
  123. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/dashboard/list-oob.txt +2 -2
  124. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/saved-search/get-oob.txt +1 -1
  125. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/saved-search/list-oob.txt +1 -1
  126. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error/{list.txt → list-errors.txt} +5 -5
  127. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error.txt +1 -1
  128. oci_cli/help_text_producer/data_files/text/cmdref/ocvs.txt +1 -1
  129. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list.txt → list-errors.txt} +5 -5
  130. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
  131. oci_cli/help_text_producer/data_files/text/cmdref/organizations/{work-request-log-entry → work-request-log}/list.txt +19 -1
  132. oci_cli/help_text_producer/data_files/text/cmdref/organizations/{work-request-log-entry.txt → work-request-log.txt} +2 -2
  133. oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +2 -2
  134. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/change-compartment.txt +1 -2
  135. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/create.txt +21 -7
  136. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/delete.txt +1 -2
  137. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/get.txt +1 -2
  138. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/update.txt +13 -2
  139. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration-collection/list-configurations.txt +9 -2
  140. oci_cli/help_text_producer/data_files/text/cmdref/psql/default-configuration-collection/list-default-configurations.txt +9 -2
  141. oci_cli/help_text_producer/data_files/text/cmdref/session/authenticate.txt +8 -8
  142. oci_cli/help_text_producer/data_files/text/cmdref/speech/voice/list.txt +6 -1
  143. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +4 -4
  144. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
  145. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
  146. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
  147. oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
  148. oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
  149. oci_cli/help_text_producer/data_files/text/cmdref/vault/secret/create-base64.txt +11 -0
  150. oci_cli/help_text_producer/data_files/text/cmdref/vault/secret/update-base64.txt +11 -0
  151. oci_cli/help_text_producer/data_files/text/cmdref/vault/secret/update.txt +11 -0
  152. oci_cli/help_text_producer/data_files/text/index.txt +2 -0
  153. oci_cli/service_mapping.py +5 -0
  154. oci_cli/version.py +1 -1
  155. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/METADATA +2 -2
  156. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/RECORD +187 -116
  157. services/ai_speech/src/oci_cli_ai_service_speech/generated/aiservicespeech_cli.py +5 -2
  158. services/api_platform/__init__.py +4 -0
  159. services/api_platform/src/__init__.py +4 -0
  160. services/api_platform/src/oci_cli_api_platform/__init__.py +4 -0
  161. services/api_platform/src/oci_cli_api_platform/generated/__init__.py +4 -0
  162. services/api_platform/src/oci_cli_api_platform/generated/apiplatform_cli.py +567 -0
  163. services/api_platform/src/oci_cli_api_platform/generated/client_mappings.py +14 -0
  164. services/api_platform/tests/__init__.py +4 -0
  165. services/apigateway/src/oci_cli_api_gateway/api_gateway_cli_extended.py +24 -0
  166. services/apigateway/src/oci_cli_api_gateway/generated/apigateway_cli.py +415 -19
  167. services/apigateway/src/oci_cli_deployment/apigateway_deployment_extended.py +8 -0
  168. services/apigateway/src/oci_cli_deployment/generated/deployment_cli.py +139 -6
  169. services/apigateway/src/oci_cli_gateway/apigateway_gateway_extended.py +9 -1
  170. services/apigateway/src/oci_cli_gateway/generated/gateway_cli.py +171 -20
  171. services/apigateway/src/oci_cli_subscribers/generated/subscribers_cli.py +139 -6
  172. services/apigateway/src/oci_cli_subscribers/subscribers_cli_extended.py +9 -0
  173. services/apigateway/src/oci_cli_usage_plans/generated/usageplans_cli.py +139 -6
  174. services/apigateway/src/oci_cli_usage_plans/usageplans_cli_extended.py +9 -0
  175. services/apm_config/src/oci_cli_config/config_cli_extended.py +16 -0
  176. services/apm_config/src/oci_cli_config/generated/config_cli.py +289 -3
  177. services/data_science/src/oci_cli_data_science/generated/datascience_cli.py +1477 -98
  178. services/devops/src/oci_cli_devops/devops_cli_extended.py +11 -11
  179. services/golden_gate/src/oci_cli_golden_gate/golden_gate_cli_extended.py +44 -0
  180. services/management_dashboard/src/oci_cli_dashx_apis/generated/dashxapis_cli.py +18 -6
  181. services/psql/src/oci_cli_postgresql/generated/postgresql_cli.py +38 -14
  182. services/vault/src/oci_cli_vaults/generated/vaults_cli.py +80 -40
  183. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/LICENSE.txt +0 -0
  184. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  185. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/WHEEL +0 -0
  186. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/entry_points.txt +0 -0
  187. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/top_level.txt +0 -0
@@ -40,15 +40,9 @@ def model_deployment_shape_group():
40
40
  pass
41
41
 
42
42
 
43
- @click.command(cli_util.override('data_science.job_shape_group.command_name', 'job-shape'), cls=CommandGroupWithAlias, help="""The compute shape used to launch a job compute instance.""")
44
- @cli_util.help_option_group
45
- def job_shape_group():
46
- pass
47
-
48
-
49
- @click.command(cli_util.override('data_science.model_deployment_group.command_name', 'model-deployment'), cls=CommandGroupWithAlias, help="""Model deployments are used by data scientists to perform predictions from the model hosted on an HTTP server.""")
43
+ @click.command(cli_util.override('data_science.model_group_group.command_name', 'model-group'), cls=CommandGroupWithAlias, help="""Model group is a collection of the models. Model groups are represented by their associated metadata.""")
50
44
  @cli_util.help_option_group
51
- def model_deployment_group():
45
+ def model_group_group():
52
46
  pass
53
47
 
54
48
 
@@ -70,12 +64,6 @@ def project_group():
70
64
  pass
71
65
 
72
66
 
73
- @click.command(cli_util.override('data_science.pipeline_run_group.command_name', 'pipeline-run'), cls=CommandGroupWithAlias, help="""Description of PipelineRun.""")
74
- @cli_util.help_option_group
75
- def pipeline_run_group():
76
- pass
77
-
78
-
79
67
  @click.command(cli_util.override('data_science.work_request_group.command_name', 'work-request'), cls=CommandGroupWithAlias, help="""An asynchronous work request.""")
80
68
  @cli_util.help_option_group
81
69
  def work_request_group():
@@ -88,69 +76,99 @@ def notebook_session_group():
88
76
  pass
89
77
 
90
78
 
91
- @click.command(cli_util.override('data_science.ml_application_implementation_group.command_name', 'ml-application-implementation'), cls=CommandGroupWithAlias, help="""Resource representing solution for AI/ML use-case defined by ML Application""")
79
+ @click.command(cli_util.override('data_science.ml_application_implementation_version_group.command_name', 'ml-application-implementation-version'), cls=CommandGroupWithAlias, help="""Read-only fully managed snapshot of MlApplicationImplementation taken when MlApplicationImplementation was updated with new ML Application package.""")
92
80
  @cli_util.help_option_group
93
- def ml_application_implementation_group():
81
+ def ml_application_implementation_version_group():
94
82
  pass
95
83
 
96
84
 
97
- @click.command(cli_util.override('data_science.pipeline_group.command_name', 'pipeline'), cls=CommandGroupWithAlias, help="""A Pipeline to orchestrate and execute machine learning workflows.""")
85
+ @click.command(cli_util.override('data_science.model_deployment_model_state_group.command_name', 'model-deployment-model-state'), cls=CommandGroupWithAlias, help="""Status of the model in a model group deployment.""")
98
86
  @cli_util.help_option_group
99
- def pipeline_group():
87
+ def model_deployment_model_state_group():
100
88
  pass
101
89
 
102
90
 
103
- @click.command(cli_util.override('data_science.schedule_group.command_name', 'schedule'), cls=CommandGroupWithAlias, help="""A repeating action. Examples: * Invoke a ML Pipeline Run once an hour. * Call ML Job Run every night at midnight.""")
91
+ @click.command(cli_util.override('data_science.job_run_group.command_name', 'job-run'), cls=CommandGroupWithAlias, help="""A job run.""")
104
92
  @cli_util.help_option_group
105
- def schedule_group():
93
+ def job_run_group():
106
94
  pass
107
95
 
108
96
 
109
- @click.command(cli_util.override('data_science.ml_application_implementation_version_group.command_name', 'ml-application-implementation-version'), cls=CommandGroupWithAlias, help="""Read-only fully managed snapshot of MlApplicationImplementation taken when MlApplicationImplementation was updated with new ML Application package.""")
97
+ @click.command(cli_util.override('data_science.fast_launch_job_config_group.command_name', 'fast-launch-job-config'), cls=CommandGroupWithAlias, help="""The shape config to launch a fast launch capable job instance""")
110
98
  @cli_util.help_option_group
111
- def ml_application_implementation_version_group():
99
+ def fast_launch_job_config_group():
112
100
  pass
113
101
 
114
102
 
115
- @click.command(cli_util.override('data_science.ml_application_group.command_name', 'ml-application'), cls=CommandGroupWithAlias, help="""Resource representing a definition of an AI/ML use-case""")
103
+ @click.command(cli_util.override('data_science.model_group.command_name', 'model'), cls=CommandGroupWithAlias, help="""Models are mathematical representations of the relationships between data. Models are represented by their associated metadata and artifacts.""")
116
104
  @cli_util.help_option_group
117
- def ml_application_group():
105
+ def model_group():
118
106
  pass
119
107
 
120
108
 
121
- @click.command(cli_util.override('data_science.model_version_set_group.command_name', 'model-version-set'), cls=CommandGroupWithAlias, help="""A model version set to associate different versions of machine learning models.""")
109
+ @click.command(cli_util.override('data_science.notebook_session_shape_group.command_name', 'notebook-session-shape'), cls=CommandGroupWithAlias, help="""The compute shape used to launch a notebook session compute instance.""")
122
110
  @cli_util.help_option_group
123
- def model_version_set_group():
111
+ def notebook_session_shape_group():
124
112
  pass
125
113
 
126
114
 
127
- @click.command(cli_util.override('data_science.job_run_group.command_name', 'job-run'), cls=CommandGroupWithAlias, help="""A job run.""")
115
+ @click.command(cli_util.override('data_science.model_group_version_history_group.command_name', 'model-group-version-history'), cls=CommandGroupWithAlias, help="""Model Group Version history to associate different versions of Model Group resource.""")
128
116
  @cli_util.help_option_group
129
- def job_run_group():
117
+ def model_group_version_history_group():
130
118
  pass
131
119
 
132
120
 
133
- @click.command(cli_util.override('data_science.fast_launch_job_config_group.command_name', 'fast-launch-job-config'), cls=CommandGroupWithAlias, help="""The shape config to launch a fast launch capable job instance""")
121
+ @click.command(cli_util.override('data_science.job_shape_group.command_name', 'job-shape'), cls=CommandGroupWithAlias, help="""The compute shape used to launch a job compute instance.""")
134
122
  @cli_util.help_option_group
135
- def fast_launch_job_config_group():
123
+ def job_shape_group():
136
124
  pass
137
125
 
138
126
 
139
- @click.command(cli_util.override('data_science.model_group.command_name', 'model'), cls=CommandGroupWithAlias, help="""Models are mathematical representations of the relationships between data. Models are represented by their associated metadata and artifacts.""")
127
+ @click.command(cli_util.override('data_science.model_deployment_group.command_name', 'model-deployment'), cls=CommandGroupWithAlias, help="""Model deployments are used by data scientists to perform predictions from the model hosted on an HTTP server.""")
140
128
  @cli_util.help_option_group
141
- def model_group():
129
+ def model_deployment_group():
142
130
  pass
143
131
 
144
132
 
145
- @click.command(cli_util.override('data_science.job_group.command_name', 'job'), cls=CommandGroupWithAlias, help="""A job for training models.""")
133
+ @click.command(cli_util.override('data_science.pipeline_run_group.command_name', 'pipeline-run'), cls=CommandGroupWithAlias, help="""Description of PipelineRun.""")
146
134
  @cli_util.help_option_group
147
- def job_group():
135
+ def pipeline_run_group():
148
136
  pass
149
137
 
150
138
 
151
- @click.command(cli_util.override('data_science.notebook_session_shape_group.command_name', 'notebook-session-shape'), cls=CommandGroupWithAlias, help="""The compute shape used to launch a notebook session compute instance.""")
139
+ @click.command(cli_util.override('data_science.ml_application_implementation_group.command_name', 'ml-application-implementation'), cls=CommandGroupWithAlias, help="""Resource representing solution for AI/ML use-case defined by ML Application""")
152
140
  @cli_util.help_option_group
153
- def notebook_session_shape_group():
141
+ def ml_application_implementation_group():
142
+ pass
143
+
144
+
145
+ @click.command(cli_util.override('data_science.pipeline_group.command_name', 'pipeline'), cls=CommandGroupWithAlias, help="""A Pipeline to orchestrate and execute machine learning workflows.""")
146
+ @cli_util.help_option_group
147
+ def pipeline_group():
148
+ pass
149
+
150
+
151
+ @click.command(cli_util.override('data_science.schedule_group.command_name', 'schedule'), cls=CommandGroupWithAlias, help="""A repeating action. Examples: * Invoke a ML Pipeline Run once an hour. * Call ML Job Run every night at midnight.""")
152
+ @cli_util.help_option_group
153
+ def schedule_group():
154
+ pass
155
+
156
+
157
+ @click.command(cli_util.override('data_science.ml_application_group.command_name', 'ml-application'), cls=CommandGroupWithAlias, help="""Resource representing a definition of an AI/ML use-case""")
158
+ @cli_util.help_option_group
159
+ def ml_application_group():
160
+ pass
161
+
162
+
163
+ @click.command(cli_util.override('data_science.model_version_set_group.command_name', 'model-version-set'), cls=CommandGroupWithAlias, help="""A model version set to associate different versions of machine learning models.""")
164
+ @cli_util.help_option_group
165
+ def model_version_set_group():
166
+ pass
167
+
168
+
169
+ @click.command(cli_util.override('data_science.job_group.command_name', 'job'), cls=CommandGroupWithAlias, help="""A job for training models.""")
170
+ @cli_util.help_option_group
171
+ def job_group():
154
172
  pass
155
173
 
156
174
 
@@ -163,25 +181,28 @@ def data_science_private_endpoint_group():
163
181
  data_science_root_group.add_command(container_group)
164
182
  data_science_root_group.add_command(register_model_artifact_reference_details_group)
165
183
  data_science_root_group.add_command(model_deployment_shape_group)
166
- data_science_root_group.add_command(job_shape_group)
167
- data_science_root_group.add_command(model_deployment_group)
184
+ data_science_root_group.add_command(model_group_group)
168
185
  data_science_root_group.add_command(ml_application_instance_group)
169
186
  data_science_root_group.add_command(ml_application_instance_view_group)
170
187
  data_science_root_group.add_command(project_group)
171
- data_science_root_group.add_command(pipeline_run_group)
172
188
  data_science_root_group.add_command(work_request_group)
173
189
  data_science_root_group.add_command(notebook_session_group)
190
+ data_science_root_group.add_command(ml_application_implementation_version_group)
191
+ data_science_root_group.add_command(model_deployment_model_state_group)
192
+ data_science_root_group.add_command(job_run_group)
193
+ data_science_root_group.add_command(fast_launch_job_config_group)
194
+ data_science_root_group.add_command(model_group)
195
+ data_science_root_group.add_command(notebook_session_shape_group)
196
+ data_science_root_group.add_command(model_group_version_history_group)
197
+ data_science_root_group.add_command(job_shape_group)
198
+ data_science_root_group.add_command(model_deployment_group)
199
+ data_science_root_group.add_command(pipeline_run_group)
174
200
  data_science_root_group.add_command(ml_application_implementation_group)
175
201
  data_science_root_group.add_command(pipeline_group)
176
202
  data_science_root_group.add_command(schedule_group)
177
- data_science_root_group.add_command(ml_application_implementation_version_group)
178
203
  data_science_root_group.add_command(ml_application_group)
179
204
  data_science_root_group.add_command(model_version_set_group)
180
- data_science_root_group.add_command(job_run_group)
181
- data_science_root_group.add_command(fast_launch_job_config_group)
182
- data_science_root_group.add_command(model_group)
183
205
  data_science_root_group.add_command(job_group)
184
- data_science_root_group.add_command(notebook_session_shape_group)
185
206
  data_science_root_group.add_command(data_science_private_endpoint_group)
186
207
 
187
208
 
@@ -291,6 +312,57 @@ def activate_model_deployment(ctx, from_json, wait_for_state, max_wait_seconds,
291
312
  cli_util.render_response(result, ctx)
292
313
 
293
314
 
315
+ @model_group_group.command(name=cli_util.override('data_science.activate_model_group.command_name', 'activate'), help=u"""Activates the model group. \n[Command Reference](activateModelGroup)""")
316
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
317
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
318
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "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.""")
319
+ @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.""")
320
+ @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.""")
321
+ @json_skeleton_utils.get_cli_json_input_option({})
322
+ @cli_util.help_option
323
+ @click.pass_context
324
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'ModelGroup'})
325
+ @cli_util.wrap_exceptions
326
+ def activate_model_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_group_id, if_match):
327
+
328
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
329
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
330
+
331
+ kwargs = {}
332
+ if if_match is not None:
333
+ kwargs['if_match'] = if_match
334
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
335
+ client = cli_util.build_client('data_science', 'data_science', ctx)
336
+ result = client.activate_model_group(
337
+ model_group_id=model_group_id,
338
+ **kwargs
339
+ )
340
+ if wait_for_state:
341
+
342
+ if hasattr(client, 'get_model_group') and callable(getattr(client, 'get_model_group')):
343
+ try:
344
+ wait_period_kwargs = {}
345
+ if max_wait_seconds is not None:
346
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
347
+ if wait_interval_seconds is not None:
348
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
349
+
350
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
351
+ result = oci.wait_until(client, client.get_model_group(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
352
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
353
+ # If we fail, we should show an error, but we should still provide the information to the customer
354
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
355
+ cli_util.render_response(result, ctx)
356
+ sys.exit(2)
357
+ except Exception:
358
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
359
+ cli_util.render_response(result, ctx)
360
+ raise
361
+ else:
362
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
363
+ cli_util.render_response(result, ctx)
364
+
365
+
294
366
  @notebook_session_group.command(name=cli_util.override('data_science.activate_notebook_session.command_name', 'activate'), help=u"""Activates the notebook session. \n[Command Reference](activateNotebookSession)""")
295
367
  @cli_util.option('--notebook-session-id', required=True, help=u"""The [OCID] of the notebook session.""")
296
368
  @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
@@ -879,6 +951,68 @@ def change_model_deployment_compartment(ctx, from_json, model_deployment_id, com
879
951
  cli_util.render_response(result, ctx)
880
952
 
881
953
 
954
+ @model_group_group.command(name=cli_util.override('data_science.change_model_group_compartment.command_name', 'change-compartment'), help=u"""Moves a model group resource into a different compartment. \n[Command Reference](changeModelGroupCompartment)""")
955
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
956
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment where the resource should be moved.""")
957
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
958
+ @json_skeleton_utils.get_cli_json_input_option({})
959
+ @cli_util.help_option
960
+ @click.pass_context
961
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
962
+ @cli_util.wrap_exceptions
963
+ def change_model_group_compartment(ctx, from_json, model_group_id, compartment_id, if_match):
964
+
965
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
966
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
967
+
968
+ kwargs = {}
969
+ if if_match is not None:
970
+ kwargs['if_match'] = if_match
971
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
972
+
973
+ _details = {}
974
+ _details['compartmentId'] = compartment_id
975
+
976
+ client = cli_util.build_client('data_science', 'data_science', ctx)
977
+ result = client.change_model_group_compartment(
978
+ model_group_id=model_group_id,
979
+ change_model_group_compartment_details=_details,
980
+ **kwargs
981
+ )
982
+ cli_util.render_response(result, ctx)
983
+
984
+
985
+ @model_group_version_history_group.command(name=cli_util.override('data_science.change_model_group_version_history_compartment.command_name', 'change-compartment'), help=u"""Moves a model Group Version History resource into a different compartment. \n[Command Reference](changeModelGroupVersionHistoryCompartment)""")
986
+ @cli_util.option('--model-group-version-history-id', required=True, help=u"""The [OCID] of the modelGroupVersionHistory.""")
987
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment where the resource should be moved.""")
988
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
989
+ @json_skeleton_utils.get_cli_json_input_option({})
990
+ @cli_util.help_option
991
+ @click.pass_context
992
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
993
+ @cli_util.wrap_exceptions
994
+ def change_model_group_version_history_compartment(ctx, from_json, model_group_version_history_id, compartment_id, if_match):
995
+
996
+ if isinstance(model_group_version_history_id, six.string_types) and len(model_group_version_history_id.strip()) == 0:
997
+ raise click.UsageError('Parameter --model-group-version-history-id cannot be whitespace or empty string')
998
+
999
+ kwargs = {}
1000
+ if if_match is not None:
1001
+ kwargs['if_match'] = if_match
1002
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1003
+
1004
+ _details = {}
1005
+ _details['compartmentId'] = compartment_id
1006
+
1007
+ client = cli_util.build_client('data_science', 'data_science', ctx)
1008
+ result = client.change_model_group_version_history_compartment(
1009
+ model_group_version_history_id=model_group_version_history_id,
1010
+ change_model_group_version_history_compartment_details=_details,
1011
+ **kwargs
1012
+ )
1013
+ cli_util.render_response(result, ctx)
1014
+
1015
+
882
1016
  @model_version_set_group.command(name=cli_util.override('data_science.change_model_version_set_compartment.command_name', 'change-compartment'), help=u"""Moves a modelVersionSet resource into a different compartment. \n[Command Reference](changeModelVersionSetCompartment)""")
883
1017
  @cli_util.option('--model-version-set-id', required=True, help=u"""The [OCID] of the model version set.""")
884
1018
  @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment where the resource should be moved to.""")
@@ -2849,62 +2983,460 @@ def create_model_deployment_single_model_deployment_configuration_details(ctx, f
2849
2983
  cli_util.render_response(result, ctx)
2850
2984
 
2851
2985
 
2852
- @model_group.command(name=cli_util.override('data_science.create_model_provenance.command_name', 'create-model-provenance'), help=u"""Creates provenance information for the specified model. \n[Command Reference](createModelProvenance)""")
2853
- @cli_util.option('--model-id', required=True, help=u"""The [OCID] of the model.""")
2854
- @cli_util.option('--repository-url', help=u"""For model reproducibility purposes. URL of the git repository associated with model training.""")
2855
- @cli_util.option('--git-branch', help=u"""For model reproducibility purposes. Branch of the git repository associated with model training.""")
2856
- @cli_util.option('--git-commit', help=u"""For model reproducibility purposes. Commit ID of the git repository associated with model training.""")
2857
- @cli_util.option('--script-dir', help=u"""For model reproducibility purposes. Path to model artifacts.""")
2858
- @cli_util.option('--training-script', help=u"""For model reproducibility purposes. Path to the python script or notebook in which the model was trained.\"""")
2859
- @cli_util.option('--training-id', help=u"""The [OCID] of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.""")
2860
- @json_skeleton_utils.get_cli_json_input_option({})
2986
+ @model_deployment_group.command(name=cli_util.override('data_science.create_model_deployment_model_group_deployment_configuration_details.command_name', 'create-model-deployment-model-group-deployment-configuration-details'), help=u"""Creates a new model deployment. \n[Command Reference](createModelDeployment)""")
2987
+ @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the model deployment.""")
2988
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment where you want to create the model deployment.""")
2989
+ @cli_util.option('--model-deployment-configuration-details-model-group-configuration-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2990
+ @cli_util.option('--model-deployment-configuration-details-infrastructure-configuration-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2991
+ @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. Example: `My ModelDeployment`""")
2992
+ @cli_util.option('--description', help=u"""A short description of the model deployment.""")
2993
+ @cli_util.option('--category-log-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2994
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2995
+ @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. See [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2996
+ @cli_util.option('--opc-parent-rpt-url', help=u"""URL to fetch the Resource Principal Token from the parent resource.""")
2997
+ @cli_util.option('--model-deployment-configuration-details-environment-configuration-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2998
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "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.""")
2999
+ @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.""")
3000
+ @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.""")
3001
+ @json_skeleton_utils.get_cli_json_input_option({'category-log-details': {'module': 'data_science', 'class': 'CategoryLogDetails'}, 'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}, 'model-deployment-configuration-details-model-group-configuration-details': {'module': 'data_science', 'class': 'ModelGroupConfigurationDetails'}, 'model-deployment-configuration-details-infrastructure-configuration-details': {'module': 'data_science', 'class': 'InfrastructureConfigurationDetails'}, 'model-deployment-configuration-details-environment-configuration-details': {'module': 'data_science', 'class': 'ModelDeploymentEnvironmentConfigurationDetails'}})
2861
3002
  @cli_util.help_option
2862
3003
  @click.pass_context
2863
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'ModelProvenance'})
3004
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'category-log-details': {'module': 'data_science', 'class': 'CategoryLogDetails'}, 'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}, 'model-deployment-configuration-details-model-group-configuration-details': {'module': 'data_science', 'class': 'ModelGroupConfigurationDetails'}, 'model-deployment-configuration-details-infrastructure-configuration-details': {'module': 'data_science', 'class': 'InfrastructureConfigurationDetails'}, 'model-deployment-configuration-details-environment-configuration-details': {'module': 'data_science', 'class': 'ModelDeploymentEnvironmentConfigurationDetails'}}, output_type={'module': 'data_science', 'class': 'ModelDeployment'})
2864
3005
  @cli_util.wrap_exceptions
2865
- def create_model_provenance(ctx, from_json, model_id, repository_url, git_branch, git_commit, script_dir, training_script, training_id):
2866
-
2867
- if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
2868
- raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
3006
+ def create_model_deployment_model_group_deployment_configuration_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, project_id, compartment_id, model_deployment_configuration_details_model_group_configuration_details, model_deployment_configuration_details_infrastructure_configuration_details, display_name, description, category_log_details, freeform_tags, defined_tags, opc_parent_rpt_url, model_deployment_configuration_details_environment_configuration_details):
2869
3007
 
2870
3008
  kwargs = {}
3009
+ if opc_parent_rpt_url is not None:
3010
+ kwargs['opc_parent_rpt_url'] = opc_parent_rpt_url
2871
3011
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2872
3012
 
2873
3013
  _details = {}
3014
+ _details['modelDeploymentConfigurationDetails'] = {}
3015
+ _details['projectId'] = project_id
3016
+ _details['compartmentId'] = compartment_id
3017
+ _details['modelDeploymentConfigurationDetails']['modelGroupConfigurationDetails'] = cli_util.parse_json_parameter("model_deployment_configuration_details_model_group_configuration_details", model_deployment_configuration_details_model_group_configuration_details)
3018
+ _details['modelDeploymentConfigurationDetails']['infrastructureConfigurationDetails'] = cli_util.parse_json_parameter("model_deployment_configuration_details_infrastructure_configuration_details", model_deployment_configuration_details_infrastructure_configuration_details)
2874
3019
 
2875
- if repository_url is not None:
2876
- _details['repositoryUrl'] = repository_url
3020
+ if display_name is not None:
3021
+ _details['displayName'] = display_name
2877
3022
 
2878
- if git_branch is not None:
2879
- _details['gitBranch'] = git_branch
3023
+ if description is not None:
3024
+ _details['description'] = description
2880
3025
 
2881
- if git_commit is not None:
2882
- _details['gitCommit'] = git_commit
3026
+ if category_log_details is not None:
3027
+ _details['categoryLogDetails'] = cli_util.parse_json_parameter("category_log_details", category_log_details)
2883
3028
 
2884
- if script_dir is not None:
2885
- _details['scriptDir'] = script_dir
3029
+ if freeform_tags is not None:
3030
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2886
3031
 
2887
- if training_script is not None:
2888
- _details['trainingScript'] = training_script
3032
+ if defined_tags is not None:
3033
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
2889
3034
 
2890
- if training_id is not None:
2891
- _details['trainingId'] = training_id
3035
+ if model_deployment_configuration_details_environment_configuration_details is not None:
3036
+ _details['modelDeploymentConfigurationDetails']['environmentConfigurationDetails'] = cli_util.parse_json_parameter("model_deployment_configuration_details_environment_configuration_details", model_deployment_configuration_details_environment_configuration_details)
3037
+
3038
+ _details['modelDeploymentConfigurationDetails']['deploymentType'] = 'MODEL_GROUP'
2892
3039
 
2893
3040
  client = cli_util.build_client('data_science', 'data_science', ctx)
2894
- result = client.create_model_provenance(
2895
- model_id=model_id,
2896
- create_model_provenance_details=_details,
3041
+ result = client.create_model_deployment(
3042
+ create_model_deployment_details=_details,
2897
3043
  **kwargs
2898
3044
  )
2899
- cli_util.render_response(result, ctx)
2900
-
3045
+ if wait_for_state:
2901
3046
 
2902
- @model_version_set_group.command(name=cli_util.override('data_science.create_model_version_set.command_name', 'create'), help=u"""Creates a new modelVersionSet. \n[Command Reference](createModelVersionSet)""")
2903
- @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the model version set in.""")
2904
- @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the model version set.""")
2905
- @cli_util.option('--name', required=True, help=u"""A user-friendly name for the resource. It must be unique and can't be modified. Avoid entering confidential information. Example: `My model version set`""")
2906
- @cli_util.option('--description', help=u"""A short description of the model version set.""")
2907
- @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
3047
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
3048
+ try:
3049
+ wait_period_kwargs = {}
3050
+ if max_wait_seconds is not None:
3051
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
3052
+ if wait_interval_seconds is not None:
3053
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
3054
+ if 'opc-work-request-id' not in result.headers:
3055
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
3056
+ cli_util.render_response(result, ctx)
3057
+ return
3058
+
3059
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
3060
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
3061
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
3062
+ # If we fail, we should show an error, but we should still provide the information to the customer
3063
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
3064
+ cli_util.render_response(result, ctx)
3065
+ sys.exit(2)
3066
+ except Exception:
3067
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
3068
+ cli_util.render_response(result, ctx)
3069
+ raise
3070
+ else:
3071
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
3072
+ cli_util.render_response(result, ctx)
3073
+
3074
+
3075
+ @model_group_group.command(name=cli_util.override('data_science.create_model_group.command_name', 'create'), help=u"""Create a new Model Group resource. \n[Command Reference](createModelGroup)""")
3076
+ @cli_util.option('--create-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["CREATE", "CLONE"]), help=u"""The type of the model group create operation.""")
3077
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the modelGroup in.""")
3078
+ @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the modelGroup.""")
3079
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "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.""")
3080
+ @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.""")
3081
+ @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.""")
3082
+ @json_skeleton_utils.get_cli_json_input_option({})
3083
+ @cli_util.help_option
3084
+ @click.pass_context
3085
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'ModelGroup'})
3086
+ @cli_util.wrap_exceptions
3087
+ def create_model_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, create_type, compartment_id, project_id):
3088
+
3089
+ kwargs = {}
3090
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
3091
+
3092
+ _details = {}
3093
+ _details['createType'] = create_type
3094
+ _details['compartmentId'] = compartment_id
3095
+ _details['projectId'] = project_id
3096
+
3097
+ client = cli_util.build_client('data_science', 'data_science', ctx)
3098
+ result = client.create_model_group(
3099
+ create_base_model_group_details=_details,
3100
+ **kwargs
3101
+ )
3102
+ if wait_for_state:
3103
+
3104
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
3105
+ try:
3106
+ wait_period_kwargs = {}
3107
+ if max_wait_seconds is not None:
3108
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
3109
+ if wait_interval_seconds is not None:
3110
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
3111
+ if 'opc-work-request-id' not in result.headers:
3112
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
3113
+ cli_util.render_response(result, ctx)
3114
+ return
3115
+
3116
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
3117
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
3118
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
3119
+ # If we fail, we should show an error, but we should still provide the information to the customer
3120
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
3121
+ cli_util.render_response(result, ctx)
3122
+ sys.exit(2)
3123
+ except Exception:
3124
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
3125
+ cli_util.render_response(result, ctx)
3126
+ raise
3127
+ else:
3128
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
3129
+ cli_util.render_response(result, ctx)
3130
+
3131
+
3132
+ @model_group_group.command(name=cli_util.override('data_science.create_model_group_clone_model_group_details.command_name', 'create-model-group-clone-model-group-details'), help=u"""Create a new Model Group resource. \n[Command Reference](createModelGroup)""")
3133
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the modelGroup in.""")
3134
+ @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the modelGroup.""")
3135
+ @cli_util.option('--model-group-clone-source-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
3136
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "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.""")
3137
+ @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.""")
3138
+ @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.""")
3139
+ @json_skeleton_utils.get_cli_json_input_option({'model-group-clone-source-details': {'module': 'data_science', 'class': 'ModelGroupCloneSourceDetails'}})
3140
+ @cli_util.help_option
3141
+ @click.pass_context
3142
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'model-group-clone-source-details': {'module': 'data_science', 'class': 'ModelGroupCloneSourceDetails'}}, output_type={'module': 'data_science', 'class': 'ModelGroup'})
3143
+ @cli_util.wrap_exceptions
3144
+ def create_model_group_clone_model_group_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, project_id, model_group_clone_source_details):
3145
+
3146
+ kwargs = {}
3147
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
3148
+
3149
+ _details = {}
3150
+ _details['compartmentId'] = compartment_id
3151
+ _details['projectId'] = project_id
3152
+ _details['modelGroupCloneSourceDetails'] = cli_util.parse_json_parameter("model_group_clone_source_details", model_group_clone_source_details)
3153
+
3154
+ _details['createType'] = 'CLONE'
3155
+
3156
+ client = cli_util.build_client('data_science', 'data_science', ctx)
3157
+ result = client.create_model_group(
3158
+ create_base_model_group_details=_details,
3159
+ **kwargs
3160
+ )
3161
+ if wait_for_state:
3162
+
3163
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
3164
+ try:
3165
+ wait_period_kwargs = {}
3166
+ if max_wait_seconds is not None:
3167
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
3168
+ if wait_interval_seconds is not None:
3169
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
3170
+ if 'opc-work-request-id' not in result.headers:
3171
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
3172
+ cli_util.render_response(result, ctx)
3173
+ return
3174
+
3175
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
3176
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
3177
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
3178
+ # If we fail, we should show an error, but we should still provide the information to the customer
3179
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
3180
+ cli_util.render_response(result, ctx)
3181
+ sys.exit(2)
3182
+ except Exception:
3183
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
3184
+ cli_util.render_response(result, ctx)
3185
+ raise
3186
+ else:
3187
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
3188
+ cli_util.render_response(result, ctx)
3189
+
3190
+
3191
+ @model_group_group.command(name=cli_util.override('data_science.create_model_group_create_model_group_details.command_name', 'create-model-group-create-model-group-details'), help=u"""Create a new Model Group resource. \n[Command Reference](createModelGroup)""")
3192
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the modelGroup in.""")
3193
+ @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the modelGroup.""")
3194
+ @cli_util.option('--model-group-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
3195
+ @cli_util.option('--member-model-entries', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
3196
+ @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. Example: `My ModelGroup`""")
3197
+ @cli_util.option('--description', help=u"""A short description of the modelGroup.""")
3198
+ @cli_util.option('--model-group-version-history-id', help=u"""The [OCID] of the model group version history to which the modelGroup is associated.""")
3199
+ @cli_util.option('--version-label', help=u"""An additional description of the lifecycle state of the model group.""")
3200
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
3201
+ @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. See [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
3202
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "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.""")
3203
+ @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.""")
3204
+ @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.""")
3205
+ @json_skeleton_utils.get_cli_json_input_option({'model-group-details': {'module': 'data_science', 'class': 'ModelGroupDetails'}, 'member-model-entries': {'module': 'data_science', 'class': 'MemberModelEntries'}, 'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}})
3206
+ @cli_util.help_option
3207
+ @click.pass_context
3208
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'model-group-details': {'module': 'data_science', 'class': 'ModelGroupDetails'}, 'member-model-entries': {'module': 'data_science', 'class': 'MemberModelEntries'}, 'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'data_science', 'class': 'ModelGroup'})
3209
+ @cli_util.wrap_exceptions
3210
+ def create_model_group_create_model_group_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, project_id, model_group_details, member_model_entries, display_name, description, model_group_version_history_id, version_label, freeform_tags, defined_tags):
3211
+
3212
+ kwargs = {}
3213
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
3214
+
3215
+ _details = {}
3216
+ _details['compartmentId'] = compartment_id
3217
+ _details['projectId'] = project_id
3218
+ _details['modelGroupDetails'] = cli_util.parse_json_parameter("model_group_details", model_group_details)
3219
+ _details['memberModelEntries'] = cli_util.parse_json_parameter("member_model_entries", member_model_entries)
3220
+
3221
+ if display_name is not None:
3222
+ _details['displayName'] = display_name
3223
+
3224
+ if description is not None:
3225
+ _details['description'] = description
3226
+
3227
+ if model_group_version_history_id is not None:
3228
+ _details['modelGroupVersionHistoryId'] = model_group_version_history_id
3229
+
3230
+ if version_label is not None:
3231
+ _details['versionLabel'] = version_label
3232
+
3233
+ if freeform_tags is not None:
3234
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
3235
+
3236
+ if defined_tags is not None:
3237
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
3238
+
3239
+ _details['createType'] = 'CREATE'
3240
+
3241
+ client = cli_util.build_client('data_science', 'data_science', ctx)
3242
+ result = client.create_model_group(
3243
+ create_base_model_group_details=_details,
3244
+ **kwargs
3245
+ )
3246
+ if wait_for_state:
3247
+
3248
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
3249
+ try:
3250
+ wait_period_kwargs = {}
3251
+ if max_wait_seconds is not None:
3252
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
3253
+ if wait_interval_seconds is not None:
3254
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
3255
+ if 'opc-work-request-id' not in result.headers:
3256
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
3257
+ cli_util.render_response(result, ctx)
3258
+ return
3259
+
3260
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
3261
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
3262
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
3263
+ # If we fail, we should show an error, but we should still provide the information to the customer
3264
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
3265
+ cli_util.render_response(result, ctx)
3266
+ sys.exit(2)
3267
+ except Exception:
3268
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
3269
+ cli_util.render_response(result, ctx)
3270
+ raise
3271
+ else:
3272
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
3273
+ cli_util.render_response(result, ctx)
3274
+
3275
+
3276
+ @model_group_group.command(name=cli_util.override('data_science.create_model_group_artifact.command_name', 'create-model-group-artifact'), help=u"""Creates artifact for the Model Group. \n[Command Reference](createModelGroupArtifact)""")
3277
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
3278
+ @cli_util.option('--model-group-artifact', required=True, help=u"""The model group artifact to upload.""")
3279
+ @cli_util.option('--content-length', type=click.INT, help=u"""The content length of the body.""")
3280
+ @cli_util.option('--content-disposition', help=u"""This header allows you to specify a filename during upload. This file name is used to dispose of the file contents while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file name when downloading. Example: `{\"Content-Disposition\": \"attachment\" \"filename\"=\"model.tar.gz\" \"Content-Length\": \"2347\" \"Content-Type\": \"application/gzip\"}`""")
3281
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
3282
+ @json_skeleton_utils.get_cli_json_input_option({})
3283
+ @cli_util.help_option
3284
+ @click.pass_context
3285
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
3286
+ @cli_util.wrap_exceptions
3287
+ def create_model_group_artifact(ctx, from_json, model_group_id, model_group_artifact, content_length, content_disposition, if_match):
3288
+
3289
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
3290
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
3291
+
3292
+ kwargs = {}
3293
+ if content_length is not None:
3294
+ kwargs['content_length'] = content_length
3295
+ if content_disposition is not None:
3296
+ kwargs['content_disposition'] = content_disposition
3297
+ if if_match is not None:
3298
+ kwargs['if_match'] = if_match
3299
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
3300
+
3301
+ # do not automatically retry operations with binary inputs
3302
+ kwargs['retry_strategy'] = oci.retry.NoneRetryStrategy()
3303
+
3304
+ client = cli_util.build_client('data_science', 'data_science', ctx)
3305
+ result = client.create_model_group_artifact(
3306
+ model_group_id=model_group_id,
3307
+ model_group_artifact=model_group_artifact,
3308
+ **kwargs
3309
+ )
3310
+ cli_util.render_response(result, ctx)
3311
+
3312
+
3313
+ @model_group_version_history_group.command(name=cli_util.override('data_science.create_model_group_version_history.command_name', 'create'), help=u"""Creates a new modelGroupVersionHistory. \n[Command Reference](createModelGroupVersionHistory)""")
3314
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the model group version history in.""")
3315
+ @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the model group version history.""")
3316
+ @cli_util.option('--display-name', help=u"""A user-friendly name for the resource. It must be unique and can't be modified. Avoid entering confidential information. Example: `My model version history`""")
3317
+ @cli_util.option('--description', help=u"""A short description of the model version history.""")
3318
+ @cli_util.option('--latest-model-group-id', help=u"""The [OCID] of the latest version of the model group to be associated.""")
3319
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
3320
+ @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. See [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
3321
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED", "FAILED", "DELETING"]), 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.""")
3322
+ @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.""")
3323
+ @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.""")
3324
+ @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}})
3325
+ @cli_util.help_option
3326
+ @click.pass_context
3327
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'data_science', 'class': 'ModelGroupVersionHistory'})
3328
+ @cli_util.wrap_exceptions
3329
+ def create_model_group_version_history(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, project_id, display_name, description, latest_model_group_id, freeform_tags, defined_tags):
3330
+
3331
+ kwargs = {}
3332
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
3333
+
3334
+ _details = {}
3335
+ _details['compartmentId'] = compartment_id
3336
+ _details['projectId'] = project_id
3337
+
3338
+ if display_name is not None:
3339
+ _details['displayName'] = display_name
3340
+
3341
+ if description is not None:
3342
+ _details['description'] = description
3343
+
3344
+ if latest_model_group_id is not None:
3345
+ _details['latestModelGroupId'] = latest_model_group_id
3346
+
3347
+ if freeform_tags is not None:
3348
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
3349
+
3350
+ if defined_tags is not None:
3351
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
3352
+
3353
+ client = cli_util.build_client('data_science', 'data_science', ctx)
3354
+ result = client.create_model_group_version_history(
3355
+ create_model_group_version_history_details=_details,
3356
+ **kwargs
3357
+ )
3358
+ if wait_for_state:
3359
+
3360
+ if hasattr(client, 'get_model_group_version_history') and callable(getattr(client, 'get_model_group_version_history')):
3361
+ try:
3362
+ wait_period_kwargs = {}
3363
+ if max_wait_seconds is not None:
3364
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
3365
+ if wait_interval_seconds is not None:
3366
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
3367
+
3368
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
3369
+ result = oci.wait_until(client, client.get_model_group_version_history(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
3370
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
3371
+ # If we fail, we should show an error, but we should still provide the information to the customer
3372
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
3373
+ cli_util.render_response(result, ctx)
3374
+ sys.exit(2)
3375
+ except Exception:
3376
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
3377
+ cli_util.render_response(result, ctx)
3378
+ raise
3379
+ else:
3380
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
3381
+ cli_util.render_response(result, ctx)
3382
+
3383
+
3384
+ @model_group.command(name=cli_util.override('data_science.create_model_provenance.command_name', 'create-model-provenance'), help=u"""Creates provenance information for the specified model. \n[Command Reference](createModelProvenance)""")
3385
+ @cli_util.option('--model-id', required=True, help=u"""The [OCID] of the model.""")
3386
+ @cli_util.option('--repository-url', help=u"""For model reproducibility purposes. URL of the git repository associated with model training.""")
3387
+ @cli_util.option('--git-branch', help=u"""For model reproducibility purposes. Branch of the git repository associated with model training.""")
3388
+ @cli_util.option('--git-commit', help=u"""For model reproducibility purposes. Commit ID of the git repository associated with model training.""")
3389
+ @cli_util.option('--script-dir', help=u"""For model reproducibility purposes. Path to model artifacts.""")
3390
+ @cli_util.option('--training-script', help=u"""For model reproducibility purposes. Path to the python script or notebook in which the model was trained.\"""")
3391
+ @cli_util.option('--training-id', help=u"""The [OCID] of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.""")
3392
+ @json_skeleton_utils.get_cli_json_input_option({})
3393
+ @cli_util.help_option
3394
+ @click.pass_context
3395
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'ModelProvenance'})
3396
+ @cli_util.wrap_exceptions
3397
+ def create_model_provenance(ctx, from_json, model_id, repository_url, git_branch, git_commit, script_dir, training_script, training_id):
3398
+
3399
+ if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
3400
+ raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
3401
+
3402
+ kwargs = {}
3403
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
3404
+
3405
+ _details = {}
3406
+
3407
+ if repository_url is not None:
3408
+ _details['repositoryUrl'] = repository_url
3409
+
3410
+ if git_branch is not None:
3411
+ _details['gitBranch'] = git_branch
3412
+
3413
+ if git_commit is not None:
3414
+ _details['gitCommit'] = git_commit
3415
+
3416
+ if script_dir is not None:
3417
+ _details['scriptDir'] = script_dir
3418
+
3419
+ if training_script is not None:
3420
+ _details['trainingScript'] = training_script
3421
+
3422
+ if training_id is not None:
3423
+ _details['trainingId'] = training_id
3424
+
3425
+ client = cli_util.build_client('data_science', 'data_science', ctx)
3426
+ result = client.create_model_provenance(
3427
+ model_id=model_id,
3428
+ create_model_provenance_details=_details,
3429
+ **kwargs
3430
+ )
3431
+ cli_util.render_response(result, ctx)
3432
+
3433
+
3434
+ @model_version_set_group.command(name=cli_util.override('data_science.create_model_version_set.command_name', 'create'), help=u"""Creates a new modelVersionSet. \n[Command Reference](createModelVersionSet)""")
3435
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the model version set in.""")
3436
+ @cli_util.option('--project-id', required=True, help=u"""The [OCID] of the project to associate with the model version set.""")
3437
+ @cli_util.option('--name', required=True, help=u"""A user-friendly name for the resource. It must be unique and can't be modified. Avoid entering confidential information. Example: `My model version set`""")
3438
+ @cli_util.option('--description', help=u"""A short description of the model version set.""")
3439
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2908
3440
  @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. See [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2909
3441
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETING", "DELETED", "FAILED"]), 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.""")
2910
3442
  @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.""")
@@ -4058,6 +4590,57 @@ def deactivate_model_deployment(ctx, from_json, wait_for_state, max_wait_seconds
4058
4590
  cli_util.render_response(result, ctx)
4059
4591
 
4060
4592
 
4593
+ @model_group_group.command(name=cli_util.override('data_science.deactivate_model_group.command_name', 'deactivate'), help=u"""Deactivates the model group. \n[Command Reference](deactivateModelGroup)""")
4594
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
4595
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
4596
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "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.""")
4597
+ @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.""")
4598
+ @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.""")
4599
+ @json_skeleton_utils.get_cli_json_input_option({})
4600
+ @cli_util.help_option
4601
+ @click.pass_context
4602
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'ModelGroup'})
4603
+ @cli_util.wrap_exceptions
4604
+ def deactivate_model_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_group_id, if_match):
4605
+
4606
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
4607
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
4608
+
4609
+ kwargs = {}
4610
+ if if_match is not None:
4611
+ kwargs['if_match'] = if_match
4612
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
4613
+ client = cli_util.build_client('data_science', 'data_science', ctx)
4614
+ result = client.deactivate_model_group(
4615
+ model_group_id=model_group_id,
4616
+ **kwargs
4617
+ )
4618
+ if wait_for_state:
4619
+
4620
+ if hasattr(client, 'get_model_group') and callable(getattr(client, 'get_model_group')):
4621
+ try:
4622
+ wait_period_kwargs = {}
4623
+ if max_wait_seconds is not None:
4624
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
4625
+ if wait_interval_seconds is not None:
4626
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
4627
+
4628
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
4629
+ result = oci.wait_until(client, client.get_model_group(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
4630
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
4631
+ # If we fail, we should show an error, but we should still provide the information to the customer
4632
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
4633
+ cli_util.render_response(result, ctx)
4634
+ sys.exit(2)
4635
+ except Exception:
4636
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
4637
+ cli_util.render_response(result, ctx)
4638
+ raise
4639
+ else:
4640
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
4641
+ cli_util.render_response(result, ctx)
4642
+
4643
+
4061
4644
  @notebook_session_group.command(name=cli_util.override('data_science.deactivate_notebook_session.command_name', 'deactivate'), help=u"""Deactivates the notebook session. \n[Command Reference](deactivateNotebookSession)""")
4062
4645
  @cli_util.option('--notebook-session-id', required=True, help=u"""The [OCID] of the notebook session.""")
4063
4646
  @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
@@ -4705,6 +5288,118 @@ def delete_model_deployment(ctx, from_json, wait_for_state, max_wait_seconds, wa
4705
5288
  cli_util.render_response(result, ctx)
4706
5289
 
4707
5290
 
5291
+ @model_group_group.command(name=cli_util.override('data_science.delete_model_group.command_name', 'delete'), help=u"""Deletes the specified Model Group. \n[Command Reference](deleteModelGroup)""")
5292
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
5293
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
5294
+ @cli_util.confirm_delete_option
5295
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "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.""")
5296
+ @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.""")
5297
+ @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.""")
5298
+ @json_skeleton_utils.get_cli_json_input_option({})
5299
+ @cli_util.help_option
5300
+ @click.pass_context
5301
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
5302
+ @cli_util.wrap_exceptions
5303
+ def delete_model_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_group_id, if_match):
5304
+
5305
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
5306
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
5307
+
5308
+ kwargs = {}
5309
+ if if_match is not None:
5310
+ kwargs['if_match'] = if_match
5311
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
5312
+ client = cli_util.build_client('data_science', 'data_science', ctx)
5313
+ result = client.delete_model_group(
5314
+ model_group_id=model_group_id,
5315
+ **kwargs
5316
+ )
5317
+ if wait_for_state:
5318
+
5319
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
5320
+ try:
5321
+ wait_period_kwargs = {}
5322
+ if max_wait_seconds is not None:
5323
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
5324
+ if wait_interval_seconds is not None:
5325
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
5326
+ if 'opc-work-request-id' not in result.headers:
5327
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
5328
+ cli_util.render_response(result, ctx)
5329
+ return
5330
+
5331
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
5332
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
5333
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
5334
+ # If we fail, we should show an error, but we should still provide the information to the customer
5335
+ 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)
5336
+ cli_util.render_response(result, ctx)
5337
+ sys.exit(2)
5338
+ except Exception:
5339
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
5340
+ cli_util.render_response(result, ctx)
5341
+ raise
5342
+ else:
5343
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
5344
+ cli_util.render_response(result, ctx)
5345
+
5346
+
5347
+ @model_group_version_history_group.command(name=cli_util.override('data_science.delete_model_group_version_history.command_name', 'delete'), help=u"""Deletes the specified modelGroupVersionHistory. \n[Command Reference](deleteModelGroupVersionHistory)""")
5348
+ @cli_util.option('--model-group-version-history-id', required=True, help=u"""The [OCID] of the modelGroupVersionHistory.""")
5349
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
5350
+ @cli_util.confirm_delete_option
5351
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "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.""")
5352
+ @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.""")
5353
+ @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.""")
5354
+ @json_skeleton_utils.get_cli_json_input_option({})
5355
+ @cli_util.help_option
5356
+ @click.pass_context
5357
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
5358
+ @cli_util.wrap_exceptions
5359
+ def delete_model_group_version_history(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_group_version_history_id, if_match):
5360
+
5361
+ if isinstance(model_group_version_history_id, six.string_types) and len(model_group_version_history_id.strip()) == 0:
5362
+ raise click.UsageError('Parameter --model-group-version-history-id cannot be whitespace or empty string')
5363
+
5364
+ kwargs = {}
5365
+ if if_match is not None:
5366
+ kwargs['if_match'] = if_match
5367
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
5368
+ client = cli_util.build_client('data_science', 'data_science', ctx)
5369
+ result = client.delete_model_group_version_history(
5370
+ model_group_version_history_id=model_group_version_history_id,
5371
+ **kwargs
5372
+ )
5373
+ if wait_for_state:
5374
+
5375
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
5376
+ try:
5377
+ wait_period_kwargs = {}
5378
+ if max_wait_seconds is not None:
5379
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
5380
+ if wait_interval_seconds is not None:
5381
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
5382
+ if 'opc-work-request-id' not in result.headers:
5383
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
5384
+ cli_util.render_response(result, ctx)
5385
+ return
5386
+
5387
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
5388
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
5389
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
5390
+ # If we fail, we should show an error, but we should still provide the information to the customer
5391
+ 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)
5392
+ cli_util.render_response(result, ctx)
5393
+ sys.exit(2)
5394
+ except Exception:
5395
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
5396
+ cli_util.render_response(result, ctx)
5397
+ raise
5398
+ else:
5399
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
5400
+ cli_util.render_response(result, ctx)
5401
+
5402
+
4708
5403
  @model_version_set_group.command(name=cli_util.override('data_science.delete_model_version_set.command_name', 'delete'), help=u"""Deletes the specified modelVersionSet. \n[Command Reference](deleteModelVersionSet)""")
4709
5404
  @cli_util.option('--model-version-set-id', required=True, help=u"""The [OCID] of the model version set.""")
4710
5405
  @cli_util.option('--is-delete-related-models', type=click.BOOL, help=u"""By default, this parameter is false. A model version set can only be deleted if all the models associate with it are already in the DELETED state. You can optionally specify the deleteRelatedModels boolean query parameters to true, which deletes all associated models for you.""")
@@ -5826,6 +6521,98 @@ def get_model_deployment(ctx, from_json, model_deployment_id):
5826
6521
  cli_util.render_response(result, ctx)
5827
6522
 
5828
6523
 
6524
+ @model_group_group.command(name=cli_util.override('data_science.get_model_group.command_name', 'get'), help=u"""Retrieves the Model Group resource based on the specified modelGroup id. \n[Command Reference](getModelGroup)""")
6525
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
6526
+ @json_skeleton_utils.get_cli_json_input_option({})
6527
+ @cli_util.help_option
6528
+ @click.pass_context
6529
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'ModelGroup'})
6530
+ @cli_util.wrap_exceptions
6531
+ def get_model_group(ctx, from_json, model_group_id):
6532
+
6533
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
6534
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
6535
+
6536
+ kwargs = {}
6537
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
6538
+ client = cli_util.build_client('data_science', 'data_science', ctx)
6539
+ result = client.get_model_group(
6540
+ model_group_id=model_group_id,
6541
+ **kwargs
6542
+ )
6543
+ cli_util.render_response(result, ctx)
6544
+
6545
+
6546
+ @model_group_group.command(name=cli_util.override('data_science.get_model_group_artifact_content.command_name', 'get-model-group-artifact-content'), help=u"""Downloads the model artifact for the specified model group. \n[Command Reference](getModelGroupArtifactContent)""")
6547
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
6548
+ @cli_util.option('--file', type=click.File(mode='wb'), required=True, help="The name of the file that will receive the response data, or '-' to write to STDOUT.")
6549
+ @cli_util.option('--range', help=u"""Optional byte range to fetch, as described in [RFC 7233], section 2.1. Note that only a single range of bytes is supported.""")
6550
+ @json_skeleton_utils.get_cli_json_input_option({})
6551
+ @cli_util.help_option
6552
+ @click.pass_context
6553
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
6554
+ @cli_util.wrap_exceptions
6555
+ def get_model_group_artifact_content(ctx, from_json, file, model_group_id, range):
6556
+
6557
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
6558
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
6559
+
6560
+ kwargs = {}
6561
+ if range is not None:
6562
+ kwargs['range'] = range
6563
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
6564
+ client = cli_util.build_client('data_science', 'data_science', ctx)
6565
+ result = client.get_model_group_artifact_content(
6566
+ model_group_id=model_group_id,
6567
+ **kwargs
6568
+ )
6569
+
6570
+ # If outputting to stdout we don't want to print a progress bar because it will get mixed up with the output
6571
+ # Also we need a non-zero Content-Length in order to display a meaningful progress bar
6572
+ bar = None
6573
+ if hasattr(file, 'name') and file.name != '<stdout>' and 'Content-Length' in result.headers:
6574
+ content_length = int(result.headers['Content-Length'])
6575
+ if content_length > 0:
6576
+ bar = click.progressbar(length=content_length, label='Downloading file')
6577
+
6578
+ try:
6579
+ if bar:
6580
+ bar.__enter__()
6581
+
6582
+ # TODO: Make the download size a configurable option
6583
+ # use decode_content=True to automatically unzip service responses (this should be overridden for object storage)
6584
+ for chunk in result.data.raw.stream(cli_constants.MEBIBYTE, decode_content=True):
6585
+ if bar:
6586
+ bar.update(len(chunk))
6587
+ file.write(chunk)
6588
+ finally:
6589
+ if bar:
6590
+ bar.render_finish()
6591
+ file.close()
6592
+
6593
+
6594
+ @model_group_version_history_group.command(name=cli_util.override('data_science.get_model_group_version_history.command_name', 'get'), help=u"""Gets the specified modelGroupVersionHistory's information. \n[Command Reference](getModelGroupVersionHistory)""")
6595
+ @cli_util.option('--model-group-version-history-id', required=True, help=u"""The [OCID] of the modelGroupVersionHistory.""")
6596
+ @json_skeleton_utils.get_cli_json_input_option({})
6597
+ @cli_util.help_option
6598
+ @click.pass_context
6599
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'ModelGroupVersionHistory'})
6600
+ @cli_util.wrap_exceptions
6601
+ def get_model_group_version_history(ctx, from_json, model_group_version_history_id):
6602
+
6603
+ if isinstance(model_group_version_history_id, six.string_types) and len(model_group_version_history_id.strip()) == 0:
6604
+ raise click.UsageError('Parameter --model-group-version-history-id cannot be whitespace or empty string')
6605
+
6606
+ kwargs = {}
6607
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
6608
+ client = cli_util.build_client('data_science', 'data_science', ctx)
6609
+ result = client.get_model_group_version_history(
6610
+ model_group_version_history_id=model_group_version_history_id,
6611
+ **kwargs
6612
+ )
6613
+ cli_util.render_response(result, ctx)
6614
+
6615
+
5829
6616
  @model_group.command(name=cli_util.override('data_science.get_model_provenance.command_name', 'get-model-provenance'), help=u"""Gets provenance information for specified model. \n[Command Reference](getModelProvenance)""")
5830
6617
  @cli_util.option('--model-id', required=True, help=u"""The [OCID] of the model.""")
5831
6618
  @json_skeleton_utils.get_cli_json_input_option({})
@@ -6153,6 +6940,28 @@ def head_model_defined_metadatum_artifact(ctx, from_json, model_id, metadatum_ke
6153
6940
  cli_util.render_response(result, ctx)
6154
6941
 
6155
6942
 
6943
+ @model_group_group.command(name=cli_util.override('data_science.head_model_group_artifact.command_name', 'head-model-group-artifact'), help=u"""Gets model group artifact metadata for a specified model group. \n[Command Reference](headModelGroupArtifact)""")
6944
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
6945
+ @json_skeleton_utils.get_cli_json_input_option({})
6946
+ @cli_util.help_option
6947
+ @click.pass_context
6948
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
6949
+ @cli_util.wrap_exceptions
6950
+ def head_model_group_artifact(ctx, from_json, model_group_id):
6951
+
6952
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
6953
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
6954
+
6955
+ kwargs = {}
6956
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
6957
+ client = cli_util.build_client('data_science', 'data_science', ctx)
6958
+ result = client.head_model_group_artifact(
6959
+ model_group_id=model_group_id,
6960
+ **kwargs
6961
+ )
6962
+ cli_util.render_response(result, ctx)
6963
+
6964
+
6156
6965
  @pipeline_group.command(name=cli_util.override('data_science.head_step_artifact.command_name', 'head-step-artifact'), help=u"""Get the artifact metadata for a step in the pipeline. \n[Command Reference](headStepArtifact)""")
6157
6966
  @cli_util.option('--pipeline-id', required=True, help=u"""The [OCID] of the pipeline.""")
6158
6967
  @cli_util.option('--step-name', required=True, help=u"""Unique Step identifier in a pipeline.""")
@@ -7049,6 +7858,83 @@ def list_ml_applications(ctx, from_json, all_pages, page_size, compartment_id, m
7049
7858
  cli_util.render_response(result, ctx)
7050
7859
 
7051
7860
 
7861
+ @model_deployment_model_state_group.command(name=cli_util.override('data_science.list_model_deployment_model_states.command_name', 'list'), help=u"""Lists the status of models in a model group deployment. \n[Command Reference](listModelDeploymentModelStates)""")
7862
+ @cli_util.option('--model-deployment-id', required=True, help=u"""The [OCID] of the model deployment.""")
7863
+ @cli_util.option('--compartment-id', required=True, help=u"""<b>Filter</b> results by the [OCID] of the compartment.""")
7864
+ @cli_util.option('--project-id', help=u"""<b>Filter</b> results by the [OCID] of the project.""")
7865
+ @cli_util.option('--display-name', help=u"""<b>Filter</b> results by its user-friendly name.""")
7866
+ @cli_util.option('--inference-key', help=u"""<b>Filter</b> results by the inference key.""")
7867
+ @cli_util.option('--model-id', help=u"""<b>Filter</b> results by the model ocid.""")
7868
+ @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. 1 is the minimum, 100 is the maximum. See [List Pagination].
7869
+
7870
+ Example: `50`""")
7871
+ @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
7872
+
7873
+ See [List Pagination].""")
7874
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).""")
7875
+ @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`, results are shown in descending order. When you sort by `displayName`, results are shown in ascending order. Sort order for the `displayName` field is case sensitive.""")
7876
+ @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.""")
7877
+ @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.""")
7878
+ @json_skeleton_utils.get_cli_json_input_option({})
7879
+ @cli_util.help_option
7880
+ @click.pass_context
7881
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'list[ModelDeploymentModelStateSummary]'})
7882
+ @cli_util.wrap_exceptions
7883
+ def list_model_deployment_model_states(ctx, from_json, all_pages, page_size, model_deployment_id, compartment_id, project_id, display_name, inference_key, model_id, limit, page, sort_order, sort_by):
7884
+
7885
+ if all_pages and limit:
7886
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
7887
+
7888
+ if isinstance(model_deployment_id, six.string_types) and len(model_deployment_id.strip()) == 0:
7889
+ raise click.UsageError('Parameter --model-deployment-id cannot be whitespace or empty string')
7890
+
7891
+ kwargs = {}
7892
+ if project_id is not None:
7893
+ kwargs['project_id'] = project_id
7894
+ if display_name is not None:
7895
+ kwargs['display_name'] = display_name
7896
+ if inference_key is not None:
7897
+ kwargs['inference_key'] = inference_key
7898
+ if model_id is not None:
7899
+ kwargs['model_id'] = model_id
7900
+ if limit is not None:
7901
+ kwargs['limit'] = limit
7902
+ if page is not None:
7903
+ kwargs['page'] = page
7904
+ if sort_order is not None:
7905
+ kwargs['sort_order'] = sort_order
7906
+ if sort_by is not None:
7907
+ kwargs['sort_by'] = sort_by
7908
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
7909
+ client = cli_util.build_client('data_science', 'data_science', ctx)
7910
+ if all_pages:
7911
+ if page_size:
7912
+ kwargs['limit'] = page_size
7913
+
7914
+ result = cli_util.list_call_get_all_results(
7915
+ client.list_model_deployment_model_states,
7916
+ model_deployment_id=model_deployment_id,
7917
+ compartment_id=compartment_id,
7918
+ **kwargs
7919
+ )
7920
+ elif limit is not None:
7921
+ result = cli_util.list_call_get_up_to_limit(
7922
+ client.list_model_deployment_model_states,
7923
+ limit,
7924
+ page_size,
7925
+ model_deployment_id=model_deployment_id,
7926
+ compartment_id=compartment_id,
7927
+ **kwargs
7928
+ )
7929
+ else:
7930
+ result = client.list_model_deployment_model_states(
7931
+ model_deployment_id=model_deployment_id,
7932
+ compartment_id=compartment_id,
7933
+ **kwargs
7934
+ )
7935
+ cli_util.render_response(result, ctx)
7936
+
7937
+
7052
7938
  @model_deployment_shape_group.command(name=cli_util.override('data_science.list_model_deployment_shapes.command_name', 'list'), help=u"""Lists the valid model deployment shapes. \n[Command Reference](listModelDeploymentShapes)""")
7053
7939
  @cli_util.option('--compartment-id', required=True, help=u"""<b>Filter</b> results by the [OCID] of the compartment.""")
7054
7940
  @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. 1 is the minimum, 100 is the maximum. See [List Pagination].
@@ -7062,18 +7948,241 @@ See [List Pagination].""")
7062
7948
  @json_skeleton_utils.get_cli_json_input_option({})
7063
7949
  @cli_util.help_option
7064
7950
  @click.pass_context
7065
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'list[ModelDeploymentShapeSummary]'})
7951
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'list[ModelDeploymentShapeSummary]'})
7952
+ @cli_util.wrap_exceptions
7953
+ def list_model_deployment_shapes(ctx, from_json, all_pages, page_size, compartment_id, limit, page):
7954
+
7955
+ if all_pages and limit:
7956
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
7957
+
7958
+ kwargs = {}
7959
+ if limit is not None:
7960
+ kwargs['limit'] = limit
7961
+ if page is not None:
7962
+ kwargs['page'] = page
7963
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
7964
+ client = cli_util.build_client('data_science', 'data_science', ctx)
7965
+ if all_pages:
7966
+ if page_size:
7967
+ kwargs['limit'] = page_size
7968
+
7969
+ result = cli_util.list_call_get_all_results(
7970
+ client.list_model_deployment_shapes,
7971
+ compartment_id=compartment_id,
7972
+ **kwargs
7973
+ )
7974
+ elif limit is not None:
7975
+ result = cli_util.list_call_get_up_to_limit(
7976
+ client.list_model_deployment_shapes,
7977
+ limit,
7978
+ page_size,
7979
+ compartment_id=compartment_id,
7980
+ **kwargs
7981
+ )
7982
+ else:
7983
+ result = client.list_model_deployment_shapes(
7984
+ compartment_id=compartment_id,
7985
+ **kwargs
7986
+ )
7987
+ cli_util.render_response(result, ctx)
7988
+
7989
+
7990
+ @model_deployment_group.command(name=cli_util.override('data_science.list_model_deployments.command_name', 'list'), help=u"""Lists all model deployments in the specified compartment. Only one parameter other than compartmentId may also be included in a query. The query must include compartmentId. If the query does not include compartmentId, or includes compartmentId but two or more other parameters an error is returned. \n[Command Reference](listModelDeployments)""")
7991
+ @cli_util.option('--compartment-id', required=True, help=u"""<b>Filter</b> results by the [OCID] of the compartment.""")
7992
+ @cli_util.option('--id', help=u"""<b>Filter</b> results by [OCID]. Must be an OCID of the correct type for the resource type.""")
7993
+ @cli_util.option('--project-id', help=u"""<b>Filter</b> results by the [OCID] of the project.""")
7994
+ @cli_util.option('--display-name', help=u"""<b>Filter</b> results by its user-friendly name.""")
7995
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "DELETING", "FAILED", "INACTIVE", "UPDATING", "DELETED", "NEEDS_ATTENTION"]), help=u"""<b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.""")
7996
+ @cli_util.option('--created-by', help=u"""<b>Filter</b> results by the [OCID] of the user who created the resource.""")
7997
+ @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. 1 is the minimum, 100 is the maximum. See [List Pagination].
7998
+
7999
+ Example: `50`""")
8000
+ @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
8001
+
8002
+ See [List Pagination].""")
8003
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).""")
8004
+ @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`, results are shown in descending order. When you sort by `displayName`, results are shown in ascending order. Sort order for the `displayName` field is case sensitive.""")
8005
+ @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.""")
8006
+ @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.""")
8007
+ @json_skeleton_utils.get_cli_json_input_option({})
8008
+ @cli_util.help_option
8009
+ @click.pass_context
8010
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'list[ModelDeploymentSummary]'})
8011
+ @cli_util.wrap_exceptions
8012
+ def list_model_deployments(ctx, from_json, all_pages, page_size, compartment_id, id, project_id, display_name, lifecycle_state, created_by, limit, page, sort_order, sort_by):
8013
+
8014
+ if all_pages and limit:
8015
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
8016
+
8017
+ kwargs = {}
8018
+ if id is not None:
8019
+ kwargs['id'] = id
8020
+ if project_id is not None:
8021
+ kwargs['project_id'] = project_id
8022
+ if display_name is not None:
8023
+ kwargs['display_name'] = display_name
8024
+ if lifecycle_state is not None:
8025
+ kwargs['lifecycle_state'] = lifecycle_state
8026
+ if created_by is not None:
8027
+ kwargs['created_by'] = created_by
8028
+ if limit is not None:
8029
+ kwargs['limit'] = limit
8030
+ if page is not None:
8031
+ kwargs['page'] = page
8032
+ if sort_order is not None:
8033
+ kwargs['sort_order'] = sort_order
8034
+ if sort_by is not None:
8035
+ kwargs['sort_by'] = sort_by
8036
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
8037
+ client = cli_util.build_client('data_science', 'data_science', ctx)
8038
+ if all_pages:
8039
+ if page_size:
8040
+ kwargs['limit'] = page_size
8041
+
8042
+ result = cli_util.list_call_get_all_results(
8043
+ client.list_model_deployments,
8044
+ compartment_id=compartment_id,
8045
+ **kwargs
8046
+ )
8047
+ elif limit is not None:
8048
+ result = cli_util.list_call_get_up_to_limit(
8049
+ client.list_model_deployments,
8050
+ limit,
8051
+ page_size,
8052
+ compartment_id=compartment_id,
8053
+ **kwargs
8054
+ )
8055
+ else:
8056
+ result = client.list_model_deployments(
8057
+ compartment_id=compartment_id,
8058
+ **kwargs
8059
+ )
8060
+ cli_util.render_response(result, ctx)
8061
+
8062
+
8063
+ @model_group_group.command(name=cli_util.override('data_science.list_model_group_models.command_name', 'list-model-group-models'), help=u"""Lists all models associated with the modelGroup in the specified compartment. \n[Command Reference](listModelGroupModels)""")
8064
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
8065
+ @cli_util.option('--compartment-id', required=True, help=u"""<b>Filter</b> results by the [OCID] of the compartment.""")
8066
+ @cli_util.option('--id', help=u"""<b>Filter</b> results by [OCID]. Must be an OCID of the correct type for the resource type.""")
8067
+ @cli_util.option('--display-name', help=u"""<b>Filter</b> results by its user-friendly name.""")
8068
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED", "FAILED", "INACTIVE"]), help=u"""<b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.""")
8069
+ @cli_util.option('--created-by', help=u"""<b>Filter</b> results by the [OCID] of the user who created the resource.""")
8070
+ @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. 1 is the minimum, 100 is the maximum. See [List Pagination].
8071
+
8072
+ Example: `50`""")
8073
+ @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
8074
+
8075
+ See [List Pagination].""")
8076
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).""")
8077
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName", "lifecycleState"]), 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. All other fields default to ascending order. Sort order for the `displayName` field is case sensitive.""")
8078
+ @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.""")
8079
+ @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.""")
8080
+ @json_skeleton_utils.get_cli_json_input_option({})
8081
+ @cli_util.help_option
8082
+ @click.pass_context
8083
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'list[ModelGroupModelSummary]'})
8084
+ @cli_util.wrap_exceptions
8085
+ def list_model_group_models(ctx, from_json, all_pages, page_size, model_group_id, compartment_id, id, display_name, lifecycle_state, created_by, limit, page, sort_order, sort_by):
8086
+
8087
+ if all_pages and limit:
8088
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
8089
+
8090
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
8091
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
8092
+
8093
+ kwargs = {}
8094
+ if id is not None:
8095
+ kwargs['id'] = id
8096
+ if display_name is not None:
8097
+ kwargs['display_name'] = display_name
8098
+ if lifecycle_state is not None:
8099
+ kwargs['lifecycle_state'] = lifecycle_state
8100
+ if created_by is not None:
8101
+ kwargs['created_by'] = created_by
8102
+ if limit is not None:
8103
+ kwargs['limit'] = limit
8104
+ if page is not None:
8105
+ kwargs['page'] = page
8106
+ if sort_order is not None:
8107
+ kwargs['sort_order'] = sort_order
8108
+ if sort_by is not None:
8109
+ kwargs['sort_by'] = sort_by
8110
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
8111
+ client = cli_util.build_client('data_science', 'data_science', ctx)
8112
+ if all_pages:
8113
+ if page_size:
8114
+ kwargs['limit'] = page_size
8115
+
8116
+ result = cli_util.list_call_get_all_results(
8117
+ client.list_model_group_models,
8118
+ model_group_id=model_group_id,
8119
+ compartment_id=compartment_id,
8120
+ **kwargs
8121
+ )
8122
+ elif limit is not None:
8123
+ result = cli_util.list_call_get_up_to_limit(
8124
+ client.list_model_group_models,
8125
+ limit,
8126
+ page_size,
8127
+ model_group_id=model_group_id,
8128
+ compartment_id=compartment_id,
8129
+ **kwargs
8130
+ )
8131
+ else:
8132
+ result = client.list_model_group_models(
8133
+ model_group_id=model_group_id,
8134
+ compartment_id=compartment_id,
8135
+ **kwargs
8136
+ )
8137
+ cli_util.render_response(result, ctx)
8138
+
8139
+
8140
+ @model_group_version_history_group.command(name=cli_util.override('data_science.list_model_group_version_histories.command_name', 'list'), help=u"""List all modelGroupVersionHistories in the specified compartment. The query must include compartmentId. \n[Command Reference](listModelGroupVersionHistories)""")
8141
+ @cli_util.option('--compartment-id', required=True, help=u"""<b>Filter</b> results by the [OCID] of the compartment.""")
8142
+ @cli_util.option('--project-id', help=u"""<b>Filter</b> results by the [OCID] of the project.""")
8143
+ @cli_util.option('--id', help=u"""<b>Filter</b> results by [OCID]. Must be an OCID of the correct type for the resource type.""")
8144
+ @cli_util.option('--display-name', help=u"""<b>Filter</b> results by its user-friendly name.""")
8145
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED", "FAILED", "DELETING"]), help=u"""A filter to return resources matching the given lifecycleState.""")
8146
+ @cli_util.option('--created-by', help=u"""<b>Filter</b> results by the [OCID] of the user who created the resource.""")
8147
+ @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. 1 is the minimum, 100 is the maximum. See [List Pagination].
8148
+
8149
+ Example: `50`""")
8150
+ @cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
8151
+
8152
+ See [List Pagination].""")
8153
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).""")
8154
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName", "lifecycleState"]), 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. All other fields default to ascending order. Sort order for the `displayName` field is case sensitive.""")
8155
+ @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.""")
8156
+ @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.""")
8157
+ @json_skeleton_utils.get_cli_json_input_option({})
8158
+ @cli_util.help_option
8159
+ @click.pass_context
8160
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'list[ModelGroupVersionHistorySummary]'})
7066
8161
  @cli_util.wrap_exceptions
7067
- def list_model_deployment_shapes(ctx, from_json, all_pages, page_size, compartment_id, limit, page):
8162
+ def list_model_group_version_histories(ctx, from_json, all_pages, page_size, compartment_id, project_id, id, display_name, lifecycle_state, created_by, limit, page, sort_order, sort_by):
7068
8163
 
7069
8164
  if all_pages and limit:
7070
8165
  raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
7071
8166
 
7072
8167
  kwargs = {}
8168
+ if project_id is not None:
8169
+ kwargs['project_id'] = project_id
8170
+ if id is not None:
8171
+ kwargs['id'] = id
8172
+ if display_name is not None:
8173
+ kwargs['display_name'] = display_name
8174
+ if lifecycle_state is not None:
8175
+ kwargs['lifecycle_state'] = lifecycle_state
8176
+ if created_by is not None:
8177
+ kwargs['created_by'] = created_by
7073
8178
  if limit is not None:
7074
8179
  kwargs['limit'] = limit
7075
8180
  if page is not None:
7076
8181
  kwargs['page'] = page
8182
+ if sort_order is not None:
8183
+ kwargs['sort_order'] = sort_order
8184
+ if sort_by is not None:
8185
+ kwargs['sort_by'] = sort_by
7077
8186
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
7078
8187
  client = cli_util.build_client('data_science', 'data_science', ctx)
7079
8188
  if all_pages:
@@ -7081,33 +8190,34 @@ def list_model_deployment_shapes(ctx, from_json, all_pages, page_size, compartme
7081
8190
  kwargs['limit'] = page_size
7082
8191
 
7083
8192
  result = cli_util.list_call_get_all_results(
7084
- client.list_model_deployment_shapes,
8193
+ client.list_model_group_version_histories,
7085
8194
  compartment_id=compartment_id,
7086
8195
  **kwargs
7087
8196
  )
7088
8197
  elif limit is not None:
7089
8198
  result = cli_util.list_call_get_up_to_limit(
7090
- client.list_model_deployment_shapes,
8199
+ client.list_model_group_version_histories,
7091
8200
  limit,
7092
8201
  page_size,
7093
8202
  compartment_id=compartment_id,
7094
8203
  **kwargs
7095
8204
  )
7096
8205
  else:
7097
- result = client.list_model_deployment_shapes(
8206
+ result = client.list_model_group_version_histories(
7098
8207
  compartment_id=compartment_id,
7099
8208
  **kwargs
7100
8209
  )
7101
8210
  cli_util.render_response(result, ctx)
7102
8211
 
7103
8212
 
7104
- @model_deployment_group.command(name=cli_util.override('data_science.list_model_deployments.command_name', 'list'), help=u"""Lists all model deployments in the specified compartment. Only one parameter other than compartmentId may also be included in a query. The query must include compartmentId. If the query does not include compartmentId, or includes compartmentId but two or more other parameters an error is returned. \n[Command Reference](listModelDeployments)""")
8213
+ @model_group_group.command(name=cli_util.override('data_science.list_model_groups.command_name', 'list'), help=u"""Lists all the modelGroups in the specified compartment. The query must include compartmentId. \n[Command Reference](listModelGroups)""")
7105
8214
  @cli_util.option('--compartment-id', required=True, help=u"""<b>Filter</b> results by the [OCID] of the compartment.""")
7106
- @cli_util.option('--id', help=u"""<b>Filter</b> results by [OCID]. Must be an OCID of the correct type for the resource type.""")
7107
8215
  @cli_util.option('--project-id', help=u"""<b>Filter</b> results by the [OCID] of the project.""")
8216
+ @cli_util.option('--id', help=u"""<b>Filter</b> results by [OCID]. Must be an OCID of the correct type for the resource type.""")
7108
8217
  @cli_util.option('--display-name', help=u"""<b>Filter</b> results by its user-friendly name.""")
7109
- @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "DELETING", "FAILED", "INACTIVE", "UPDATING", "DELETED", "NEEDS_ATTENTION"]), help=u"""<b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.""")
8218
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "DELETED"]), help=u"""A filter to return resources matching the given lifecycleState.""")
7110
8219
  @cli_util.option('--created-by', help=u"""<b>Filter</b> results by the [OCID] of the user who created the resource.""")
8220
+ @cli_util.option('--model-group-version-history-id', help=u"""The [OCID] of the modelGroupVersionHistory.""")
7111
8221
  @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. 1 is the minimum, 100 is the maximum. See [List Pagination].
7112
8222
 
7113
8223
  Example: `50`""")
@@ -7115,30 +8225,32 @@ Example: `50`""")
7115
8225
 
7116
8226
  See [List Pagination].""")
7117
8227
  @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).""")
7118
- @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`, results are shown in descending order. When you sort by `displayName`, results are shown in ascending order. Sort order for the `displayName` field is case sensitive.""")
8228
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName", "lifecycleState"]), 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. All other fields default to ascending order. Sort order for the `displayName` field is case sensitive.""")
7119
8229
  @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.""")
7120
8230
  @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.""")
7121
8231
  @json_skeleton_utils.get_cli_json_input_option({})
7122
8232
  @cli_util.help_option
7123
8233
  @click.pass_context
7124
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'list[ModelDeploymentSummary]'})
8234
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'data_science', 'class': 'list[ModelGroupSummary]'})
7125
8235
  @cli_util.wrap_exceptions
7126
- def list_model_deployments(ctx, from_json, all_pages, page_size, compartment_id, id, project_id, display_name, lifecycle_state, created_by, limit, page, sort_order, sort_by):
8236
+ def list_model_groups(ctx, from_json, all_pages, page_size, compartment_id, project_id, id, display_name, lifecycle_state, created_by, model_group_version_history_id, limit, page, sort_order, sort_by):
7127
8237
 
7128
8238
  if all_pages and limit:
7129
8239
  raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
7130
8240
 
7131
8241
  kwargs = {}
7132
- if id is not None:
7133
- kwargs['id'] = id
7134
8242
  if project_id is not None:
7135
8243
  kwargs['project_id'] = project_id
8244
+ if id is not None:
8245
+ kwargs['id'] = id
7136
8246
  if display_name is not None:
7137
8247
  kwargs['display_name'] = display_name
7138
8248
  if lifecycle_state is not None:
7139
8249
  kwargs['lifecycle_state'] = lifecycle_state
7140
8250
  if created_by is not None:
7141
8251
  kwargs['created_by'] = created_by
8252
+ if model_group_version_history_id is not None:
8253
+ kwargs['model_group_version_history_id'] = model_group_version_history_id
7142
8254
  if limit is not None:
7143
8255
  kwargs['limit'] = limit
7144
8256
  if page is not None:
@@ -7154,20 +8266,20 @@ def list_model_deployments(ctx, from_json, all_pages, page_size, compartment_id,
7154
8266
  kwargs['limit'] = page_size
7155
8267
 
7156
8268
  result = cli_util.list_call_get_all_results(
7157
- client.list_model_deployments,
8269
+ client.list_model_groups,
7158
8270
  compartment_id=compartment_id,
7159
8271
  **kwargs
7160
8272
  )
7161
8273
  elif limit is not None:
7162
8274
  result = cli_util.list_call_get_up_to_limit(
7163
- client.list_model_deployments,
8275
+ client.list_model_groups,
7164
8276
  limit,
7165
8277
  page_size,
7166
8278
  compartment_id=compartment_id,
7167
8279
  **kwargs
7168
8280
  )
7169
8281
  else:
7170
- result = client.list_model_deployments(
8282
+ result = client.list_model_groups(
7171
8283
  compartment_id=compartment_id,
7172
8284
  **kwargs
7173
8285
  )
@@ -7856,7 +8968,7 @@ def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id
7856
8968
  @work_request_group.command(name=cli_util.override('data_science.list_work_requests.command_name', 'list'), help=u"""Lists work requests in the specified compartment. \n[Command Reference](listWorkRequests)""")
7857
8969
  @cli_util.option('--compartment-id', required=True, help=u"""<b>Filter</b> results by the [OCID] of the compartment.""")
7858
8970
  @cli_util.option('--id', help=u"""<b>Filter</b> results by [OCID]. Must be an OCID of the correct type for the resource type.""")
7859
- @cli_util.option('--operation-type', type=custom_types.CliCaseInsensitiveChoice(["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL"]), help=u"""<b>Filter</b> results by the type of the operation associated with the work request.""")
8971
+ @cli_util.option('--operation-type', type=custom_types.CliCaseInsensitiveChoice(["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", "MODEL_GROUP_CREATE", "MODEL_GROUP_UPDATE", "MODEL_GROUP_DELETE", "MODEL_GROUP_VERSION_HISTORY_DELETE"]), help=u"""<b>Filter</b> results by the type of the operation associated with the work request.""")
7860
8972
  @cli_util.option('--status', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), help=u"""<b>Filter</b> results by work request status.""")
7861
8973
  @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. 1 is the minimum, 100 is the maximum. See [List Pagination].
7862
8974
 
@@ -9363,6 +10475,109 @@ def update_model_deployment(ctx, from_json, force, wait_for_state, max_wait_seco
9363
10475
  cli_util.render_response(result, ctx)
9364
10476
 
9365
10477
 
10478
+ @model_deployment_group.command(name=cli_util.override('data_science.update_model_deployment_update_model_group_deployment_configuration_details.command_name', 'update-model-deployment-update-model-group-deployment-configuration-details'), help=u"""Updates the properties of a model deployment. Some of the properties of `modelDeploymentConfigurationDetails` or `CategoryLogDetails` can also be updated with zero down time when the model deployment's lifecycle state is ACTIVE or NEEDS_ATTENTION i.e `instanceShapeName`, `instanceCount` and `modelId`, separately `loadBalancerShape` or `CategoryLogDetails` can also be updated independently. All of the fields can be updated when the deployment is in the INACTIVE lifecycle state. Changes will take effect the next time the model deployment is activated. \n[Command Reference](updateModelDeployment)""")
10479
+ @cli_util.option('--model-deployment-id', required=True, help=u"""The [OCID] of the model deployment.""")
10480
+ @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. Example: `My ModelDeployment`""")
10481
+ @cli_util.option('--description', help=u"""A short description of the model deployment.""")
10482
+ @cli_util.option('--category-log-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10483
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10484
+ @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. See [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10485
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
10486
+ @cli_util.option('--model-deployment-configuration-details-update-type', type=custom_types.CliCaseInsensitiveChoice(["ZDT", "LIVE"]), help=u"""The type of update operation.""")
10487
+ @cli_util.option('--model-deployment-configuration-details-model-group-configuration-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10488
+ @cli_util.option('--model-deployment-configuration-details-infrastructure-configuration-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10489
+ @cli_util.option('--model-deployment-configuration-details-environment-configuration-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10490
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
10491
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "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.""")
10492
+ @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.""")
10493
+ @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.""")
10494
+ @json_skeleton_utils.get_cli_json_input_option({'category-log-details': {'module': 'data_science', 'class': 'UpdateCategoryLogDetails'}, 'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}, 'model-deployment-configuration-details-model-group-configuration-details': {'module': 'data_science', 'class': 'UpdateModelGroupConfigurationDetails'}, 'model-deployment-configuration-details-infrastructure-configuration-details': {'module': 'data_science', 'class': 'UpdateInfrastructureConfigurationDetails'}, 'model-deployment-configuration-details-environment-configuration-details': {'module': 'data_science', 'class': 'UpdateModelDeploymentEnvironmentConfigurationDetails'}})
10495
+ @cli_util.help_option
10496
+ @click.pass_context
10497
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'category-log-details': {'module': 'data_science', 'class': 'UpdateCategoryLogDetails'}, 'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}, 'model-deployment-configuration-details-model-group-configuration-details': {'module': 'data_science', 'class': 'UpdateModelGroupConfigurationDetails'}, 'model-deployment-configuration-details-infrastructure-configuration-details': {'module': 'data_science', 'class': 'UpdateInfrastructureConfigurationDetails'}, 'model-deployment-configuration-details-environment-configuration-details': {'module': 'data_science', 'class': 'UpdateModelDeploymentEnvironmentConfigurationDetails'}})
10498
+ @cli_util.wrap_exceptions
10499
+ def update_model_deployment_update_model_group_deployment_configuration_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, model_deployment_id, display_name, description, category_log_details, freeform_tags, defined_tags, if_match, model_deployment_configuration_details_update_type, model_deployment_configuration_details_model_group_configuration_details, model_deployment_configuration_details_infrastructure_configuration_details, model_deployment_configuration_details_environment_configuration_details):
10500
+
10501
+ if isinstance(model_deployment_id, six.string_types) and len(model_deployment_id.strip()) == 0:
10502
+ raise click.UsageError('Parameter --model-deployment-id cannot be whitespace or empty string')
10503
+ if not force:
10504
+ if category_log_details or freeform_tags or defined_tags:
10505
+ if not click.confirm("WARNING: Updates to category-log-details and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
10506
+ ctx.abort()
10507
+
10508
+ kwargs = {}
10509
+ if if_match is not None:
10510
+ kwargs['if_match'] = if_match
10511
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
10512
+
10513
+ _details = {}
10514
+ _details['modelDeploymentConfigurationDetails'] = {}
10515
+
10516
+ if display_name is not None:
10517
+ _details['displayName'] = display_name
10518
+
10519
+ if description is not None:
10520
+ _details['description'] = description
10521
+
10522
+ if category_log_details is not None:
10523
+ _details['categoryLogDetails'] = cli_util.parse_json_parameter("category_log_details", category_log_details)
10524
+
10525
+ if freeform_tags is not None:
10526
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
10527
+
10528
+ if defined_tags is not None:
10529
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
10530
+
10531
+ if model_deployment_configuration_details_update_type is not None:
10532
+ _details['modelDeploymentConfigurationDetails']['updateType'] = model_deployment_configuration_details_update_type
10533
+
10534
+ if model_deployment_configuration_details_model_group_configuration_details is not None:
10535
+ _details['modelDeploymentConfigurationDetails']['modelGroupConfigurationDetails'] = cli_util.parse_json_parameter("model_deployment_configuration_details_model_group_configuration_details", model_deployment_configuration_details_model_group_configuration_details)
10536
+
10537
+ if model_deployment_configuration_details_infrastructure_configuration_details is not None:
10538
+ _details['modelDeploymentConfigurationDetails']['infrastructureConfigurationDetails'] = cli_util.parse_json_parameter("model_deployment_configuration_details_infrastructure_configuration_details", model_deployment_configuration_details_infrastructure_configuration_details)
10539
+
10540
+ if model_deployment_configuration_details_environment_configuration_details is not None:
10541
+ _details['modelDeploymentConfigurationDetails']['environmentConfigurationDetails'] = cli_util.parse_json_parameter("model_deployment_configuration_details_environment_configuration_details", model_deployment_configuration_details_environment_configuration_details)
10542
+
10543
+ _details['modelDeploymentConfigurationDetails']['deploymentType'] = 'MODEL_GROUP'
10544
+
10545
+ client = cli_util.build_client('data_science', 'data_science', ctx)
10546
+ result = client.update_model_deployment(
10547
+ model_deployment_id=model_deployment_id,
10548
+ update_model_deployment_details=_details,
10549
+ **kwargs
10550
+ )
10551
+ if wait_for_state:
10552
+
10553
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
10554
+ try:
10555
+ wait_period_kwargs = {}
10556
+ if max_wait_seconds is not None:
10557
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
10558
+ if wait_interval_seconds is not None:
10559
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
10560
+ if 'opc-work-request-id' not in result.headers:
10561
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
10562
+ cli_util.render_response(result, ctx)
10563
+ return
10564
+
10565
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
10566
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
10567
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
10568
+ # If we fail, we should show an error, but we should still provide the information to the customer
10569
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
10570
+ cli_util.render_response(result, ctx)
10571
+ sys.exit(2)
10572
+ except Exception:
10573
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
10574
+ cli_util.render_response(result, ctx)
10575
+ raise
10576
+ else:
10577
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
10578
+ cli_util.render_response(result, ctx)
10579
+
10580
+
9366
10581
  @model_deployment_group.command(name=cli_util.override('data_science.update_model_deployment_update_single_model_deployment_configuration_details.command_name', 'update-model-deployment-update-single-model-deployment-configuration-details'), help=u"""Updates the properties of a model deployment. Some of the properties of `modelDeploymentConfigurationDetails` or `CategoryLogDetails` can also be updated with zero down time when the model deployment's lifecycle state is ACTIVE or NEEDS_ATTENTION i.e `instanceShapeName`, `instanceCount` and `modelId`, separately `loadBalancerShape` or `CategoryLogDetails` can also be updated independently. All of the fields can be updated when the deployment is in the INACTIVE lifecycle state. Changes will take effect the next time the model deployment is activated. \n[Command Reference](updateModelDeployment)""")
9367
10582
  @cli_util.option('--model-deployment-id', required=True, help=u"""The [OCID] of the model deployment.""")
9368
10583
  @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. Example: `My ModelDeployment`""")
@@ -9458,6 +10673,170 @@ def update_model_deployment_update_single_model_deployment_configuration_details
9458
10673
  cli_util.render_response(result, ctx)
9459
10674
 
9460
10675
 
10676
+ @model_group_group.command(name=cli_util.override('data_science.update_model_group.command_name', 'update'), help=u"""Updates the properties of the Model Group. \n[Command Reference](updateModelGroup)""")
10677
+ @cli_util.option('--model-group-id', required=True, help=u"""The [OCID] of the modelGroup.""")
10678
+ @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. Example: `My ModelGroup`""")
10679
+ @cli_util.option('--description', help=u"""A short description of the modelGroup.""")
10680
+ @cli_util.option('--version-label', help=u"""An additional description of the lifecycle state of the model group.""")
10681
+ @cli_util.option('--model-group-version-history-id', help=u"""The [OCID] of the model group version history to which the modelGroup will be associated.""")
10682
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10683
+ @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. See [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10684
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
10685
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
10686
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "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.""")
10687
+ @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.""")
10688
+ @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.""")
10689
+ @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}})
10690
+ @cli_util.help_option
10691
+ @click.pass_context
10692
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'data_science', 'class': 'ModelGroup'})
10693
+ @cli_util.wrap_exceptions
10694
+ def update_model_group(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, model_group_id, display_name, description, version_label, model_group_version_history_id, freeform_tags, defined_tags, if_match):
10695
+
10696
+ if isinstance(model_group_id, six.string_types) and len(model_group_id.strip()) == 0:
10697
+ raise click.UsageError('Parameter --model-group-id cannot be whitespace or empty string')
10698
+ if not force:
10699
+ if freeform_tags or defined_tags:
10700
+ if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
10701
+ ctx.abort()
10702
+
10703
+ kwargs = {}
10704
+ if if_match is not None:
10705
+ kwargs['if_match'] = if_match
10706
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
10707
+
10708
+ _details = {}
10709
+
10710
+ if display_name is not None:
10711
+ _details['displayName'] = display_name
10712
+
10713
+ if description is not None:
10714
+ _details['description'] = description
10715
+
10716
+ if version_label is not None:
10717
+ _details['versionLabel'] = version_label
10718
+
10719
+ if model_group_version_history_id is not None:
10720
+ _details['modelGroupVersionHistoryId'] = model_group_version_history_id
10721
+
10722
+ if freeform_tags is not None:
10723
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
10724
+
10725
+ if defined_tags is not None:
10726
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
10727
+
10728
+ client = cli_util.build_client('data_science', 'data_science', ctx)
10729
+ result = client.update_model_group(
10730
+ model_group_id=model_group_id,
10731
+ update_model_group_details=_details,
10732
+ **kwargs
10733
+ )
10734
+ if wait_for_state:
10735
+
10736
+ if hasattr(client, 'get_model_group') and callable(getattr(client, 'get_model_group')):
10737
+ try:
10738
+ wait_period_kwargs = {}
10739
+ if max_wait_seconds is not None:
10740
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
10741
+ if wait_interval_seconds is not None:
10742
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
10743
+
10744
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
10745
+ result = oci.wait_until(client, client.get_model_group(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
10746
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
10747
+ # If we fail, we should show an error, but we should still provide the information to the customer
10748
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
10749
+ cli_util.render_response(result, ctx)
10750
+ sys.exit(2)
10751
+ except Exception:
10752
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
10753
+ cli_util.render_response(result, ctx)
10754
+ raise
10755
+ else:
10756
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
10757
+ cli_util.render_response(result, ctx)
10758
+
10759
+
10760
+ @model_group_version_history_group.command(name=cli_util.override('data_science.update_model_group_version_history.command_name', 'update'), help=u"""Updates the properties of a modelGroupVersionHistory. \n[Command Reference](updateModelGroupVersionHistory)""")
10761
+ @cli_util.option('--model-group-version-history-id', required=True, help=u"""The [OCID] of the modelGroupVersionHistory.""")
10762
+ @cli_util.option('--display-name', help=u"""A user-friendly display name for the resource.""")
10763
+ @cli_util.option('--description', help=u"""A short description of the model group version history.""")
10764
+ @cli_util.option('--latest-model-group-id', help=u"""The OCID of the latest version of the model group associated.""")
10765
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags]. Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10766
+ @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. See [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
10767
+ @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 is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.""")
10768
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
10769
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED", "FAILED", "DELETING"]), 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.""")
10770
+ @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.""")
10771
+ @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.""")
10772
+ @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}})
10773
+ @cli_util.help_option
10774
+ @click.pass_context
10775
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'data_science', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_science', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'data_science', 'class': 'ModelGroupVersionHistory'})
10776
+ @cli_util.wrap_exceptions
10777
+ def update_model_group_version_history(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, model_group_version_history_id, display_name, description, latest_model_group_id, freeform_tags, defined_tags, if_match):
10778
+
10779
+ if isinstance(model_group_version_history_id, six.string_types) and len(model_group_version_history_id.strip()) == 0:
10780
+ raise click.UsageError('Parameter --model-group-version-history-id cannot be whitespace or empty string')
10781
+ if not force:
10782
+ if freeform_tags or defined_tags:
10783
+ if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
10784
+ ctx.abort()
10785
+
10786
+ kwargs = {}
10787
+ if if_match is not None:
10788
+ kwargs['if_match'] = if_match
10789
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
10790
+
10791
+ _details = {}
10792
+
10793
+ if display_name is not None:
10794
+ _details['displayName'] = display_name
10795
+
10796
+ if description is not None:
10797
+ _details['description'] = description
10798
+
10799
+ if latest_model_group_id is not None:
10800
+ _details['latestModelGroupId'] = latest_model_group_id
10801
+
10802
+ if freeform_tags is not None:
10803
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
10804
+
10805
+ if defined_tags is not None:
10806
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
10807
+
10808
+ client = cli_util.build_client('data_science', 'data_science', ctx)
10809
+ result = client.update_model_group_version_history(
10810
+ model_group_version_history_id=model_group_version_history_id,
10811
+ update_model_group_version_history_details=_details,
10812
+ **kwargs
10813
+ )
10814
+ if wait_for_state:
10815
+
10816
+ if hasattr(client, 'get_model_group_version_history') and callable(getattr(client, 'get_model_group_version_history')):
10817
+ try:
10818
+ wait_period_kwargs = {}
10819
+ if max_wait_seconds is not None:
10820
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
10821
+ if wait_interval_seconds is not None:
10822
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
10823
+
10824
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
10825
+ result = oci.wait_until(client, client.get_model_group_version_history(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
10826
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
10827
+ # If we fail, we should show an error, but we should still provide the information to the customer
10828
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
10829
+ cli_util.render_response(result, ctx)
10830
+ sys.exit(2)
10831
+ except Exception:
10832
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
10833
+ cli_util.render_response(result, ctx)
10834
+ raise
10835
+ else:
10836
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
10837
+ cli_util.render_response(result, ctx)
10838
+
10839
+
9461
10840
  @model_group.command(name=cli_util.override('data_science.update_model_provenance.command_name', 'update-model-provenance'), help=u"""Updates the provenance information for the specified model. \n[Command Reference](updateModelProvenance)""")
9462
10841
  @cli_util.option('--model-id', required=True, help=u"""The [OCID] of the model.""")
9463
10842
  @cli_util.option('--repository-url', help=u"""For model reproducibility purposes. URL of the git repository associated with model training.""")