oci-cli 3.62.0__py3-none-any.whl → 3.62.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. oci_cli/bin/opsi.psm1 +25 -8
  2. oci_cli/help_text_producer/data_files/text/cmdref/ai-document/analyze-document-result/analyze-document-inline-document-details.txt +12 -0
  3. oci_cli/help_text_producer/data_files/text/cmdref/ai-document/analyze-document-result/analyze-document-object-storage-document-details.txt +12 -0
  4. oci_cli/help_text_producer/data_files/text/cmdref/ai-document/model/create.txt +22 -0
  5. oci_cli/help_text_producer/data_files/text/cmdref/ai-document/model/update.txt +4 -0
  6. oci_cli/help_text_producer/data_files/text/cmdref/ai-document/model-type-info/get-model-type.txt +99 -0
  7. oci_cli/help_text_producer/data_files/text/cmdref/ai-document/model-type-info.txt +14 -0
  8. oci_cli/help_text_producer/data_files/text/cmdref/ai-document/processor-job/create-processor-job-inline-document-content.txt +12 -0
  9. oci_cli/help_text_producer/data_files/text/cmdref/ai-document/processor-job/create-processor-job-invoice-processor-config.txt +165 -0
  10. oci_cli/help_text_producer/data_files/text/cmdref/ai-document/processor-job.txt +2 -0
  11. oci_cli/help_text_producer/data_files/text/cmdref/ai-document.txt +6 -0
  12. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/{work-request-log/list.txt → work-request-log-entry/list-work-request-logs.txt} +5 -5
  13. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/{work-request-log.txt → work-request-log-entry.txt} +3 -3
  14. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request.txt +2 -2
  15. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +2 -2
  16. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log/list.txt → work-request-log-entry/list-work-request-logs.txt} +5 -5
  17. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log.txt → work-request-log-entry.txt} +3 -3
  18. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request.txt +2 -2
  19. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane.txt +2 -2
  20. oci_cli/help_text_producer/data_files/text/cmdref/lfs/lustre-file-system.txt +1 -1
  21. oci_cli/help_text_producer/data_files/text/cmdref/lfs.txt +2 -1
  22. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/change-autonomous-database-insight-advanced-features-credential-by-iam.txt +7 -7
  23. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/change-autonomous-database-insight-advanced-features-credential-by-vault.txt +1 -7
  24. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/change-macs-managed-autonomous-database-insight-connection-credential-by-named-credentials.txt +152 -0
  25. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/change-macs-managed-autonomous-database-insight-connection-credential-by-vault.txt +175 -0
  26. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/change-macs-managed-autonomous-database-insight-connection-credentials-by-source.txt +154 -0
  27. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/change-macs-managed-cloud-database-insight-connection-credential-by-iam.txt +7 -7
  28. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/change-macs-managed-cloud-database-insight-connection-credential-by-named-credentials.txt +158 -0
  29. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/change-pe-comanaged-database-detail.txt +7 -7
  30. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/create-macs-managed-autonomous-database-insight.txt +210 -0
  31. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/enable-autonomous-database-insight-advanced-features-credential-by-iam.txt +7 -7
  32. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/enable-autonomous-database-insight-advanced-features-credential-by-vault.txt +1 -7
  33. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/enable-macs-managed-autonomous-database-insight.txt +203 -0
  34. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/list-database-configurations.txt +1 -1
  35. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/list.txt +1 -1
  36. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/summarize-database-insight-resource-capacity-trend.txt +1 -1
  37. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/summarize-database-insight-resource-forecast-trend.txt +1 -1
  38. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/summarize-database-insight-resource-statistics.txt +1 -1
  39. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/summarize-database-insight-resource-usage-trend.txt +1 -1
  40. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/summarize-database-insight-resource-usage.txt +1 -1
  41. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/summarize-database-insight-resource-utilization-insight.txt +1 -1
  42. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/summarize-sql-insights.txt +1 -1
  43. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/summarize-sql-statistics.txt +1 -1
  44. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/synchronize-autonomous-database-to-exadata.txt +152 -0
  45. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/test-macs-managed-autonomous-database-insight-connection-credential-by-named-credentials.txt +151 -0
  46. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/test-macs-managed-cloud-database-insight-connection-credential-by-iam.txt +7 -7
  47. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights/update-macs-managed-autonomous-database-insight.txt +155 -0
  48. oci_cli/help_text_producer/data_files/text/cmdref/opsi/database-insights.txt +23 -0
  49. oci_cli/help_text_producer/data_files/text/cmdref/opsi/{news-report → news-reports}/list.txt +2 -2
  50. oci_cli/help_text_producer/data_files/text/cmdref/opsi/news-reports.txt +2 -0
  51. oci_cli/help_text_producer/data_files/text/cmdref/opsi.txt +25 -4
  52. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list.txt → list-errors.txt} +5 -5
  53. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
  54. oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +1 -1
  55. oci_cli/help_text_producer/data_files/text/cmdref/session/authenticate.txt +1 -1
  56. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +4 -4
  57. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
  58. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
  59. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
  60. oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
  61. oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
  62. oci_cli/version.py +1 -1
  63. {oci_cli-3.62.0.dist-info → oci_cli-3.62.1.dist-info}/METADATA +2 -2
  64. {oci_cli-3.62.0.dist-info → oci_cli-3.62.1.dist-info}/RECORD +73 -62
  65. services/ai_document/src/oci_cli_ai_service_document/generated/aiservicedocument_cli.py +142 -13
  66. services/log_analytics/src/oci_cli_log_analytics/log_analytics_cli_extended.py +17 -6
  67. services/opsi/src/oci_cli_operations_insights/generated/operationsinsights_cli.py +4541 -3121
  68. services/opsi/src/oci_cli_operations_insights/operationsinsights_cli_extended.py +82 -10
  69. oci_cli/help_text_producer/data_files/text/cmdref/opsi/news-report.txt +0 -14
  70. {oci_cli-3.62.0.dist-info → oci_cli-3.62.1.dist-info}/LICENSE.txt +0 -0
  71. {oci_cli-3.62.0.dist-info → oci_cli-3.62.1.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  72. {oci_cli-3.62.0.dist-info → oci_cli-3.62.1.dist-info}/WHEEL +0 -0
  73. {oci_cli-3.62.0.dist-info → oci_cli-3.62.1.dist-info}/entry_points.txt +0 -0
  74. {oci_cli-3.62.0.dist-info → oci_cli-3.62.1.dist-info}/top_level.txt +0 -0
@@ -40,6 +40,12 @@ def analyze_document_result_group():
40
40
  pass
41
41
 
42
42
 
43
+ @click.command(cli_util.override('ai_document.model_type_info_group.command_name', 'model-type-info'), cls=CommandGroupWithAlias, help="""Model information like versions and capabilities""")
44
+ @cli_util.help_option_group
45
+ def model_type_info_group():
46
+ pass
47
+
48
+
43
49
  @click.command(cli_util.override('ai_document.model_group.command_name', 'model'), cls=CommandGroupWithAlias, help="""Machine-learned Model.""")
44
50
  @cli_util.help_option_group
45
51
  def model_group():
@@ -67,6 +73,7 @@ def processor_job_group():
67
73
  ai_document_root_group.add_command(work_request_error_group)
68
74
  ai_document_root_group.add_command(project_group)
69
75
  ai_document_root_group.add_command(analyze_document_result_group)
76
+ ai_document_root_group.add_command(model_type_info_group)
70
77
  ai_document_root_group.add_command(model_group)
71
78
  ai_document_root_group.add_command(work_request_log_entry_group)
72
79
  ai_document_root_group.add_command(work_request_group)
@@ -268,12 +275,13 @@ def analyze_document(ctx, from_json, features, document, compartment_id, output_
268
275
  @cli_util.option('--document-type', type=custom_types.CliCaseInsensitiveChoice(["INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS", "HEALTH_INSURANCE_ID"]), help=u"""The document type.""")
269
276
  @cli_util.option('--ocr-data', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
270
277
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
271
- @json_skeleton_utils.get_cli_json_input_option({'features': {'module': 'ai_document', 'class': 'list[DocumentFeature]'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'ocr-data': {'module': 'ai_document', 'class': 'AnalyzeDocumentResult'}})
278
+ @cli_util.option('--document-page-range', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The page ranges to be analysed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
279
+ @json_skeleton_utils.get_cli_json_input_option({'features': {'module': 'ai_document', 'class': 'list[DocumentFeature]'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'ocr-data': {'module': 'ai_document', 'class': 'AnalyzeDocumentResult'}, 'document-page-range': {'module': 'ai_document', 'class': 'list[string]'}})
272
280
  @cli_util.help_option
273
281
  @click.pass_context
274
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'features': {'module': 'ai_document', 'class': 'list[DocumentFeature]'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'ocr-data': {'module': 'ai_document', 'class': 'AnalyzeDocumentResult'}}, output_type={'module': 'ai_document', 'class': 'AnalyzeDocumentResult'})
282
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'features': {'module': 'ai_document', 'class': 'list[DocumentFeature]'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'ocr-data': {'module': 'ai_document', 'class': 'AnalyzeDocumentResult'}, 'document-page-range': {'module': 'ai_document', 'class': 'list[string]'}}, output_type={'module': 'ai_document', 'class': 'AnalyzeDocumentResult'})
275
283
  @cli_util.wrap_exceptions
276
- def analyze_document_object_storage_document_details(ctx, from_json, features, document_namespace_name, document_bucket_name, document_object_name, compartment_id, output_location, language, document_type, ocr_data, if_match):
284
+ def analyze_document_object_storage_document_details(ctx, from_json, features, document_namespace_name, document_bucket_name, document_object_name, compartment_id, output_location, language, document_type, ocr_data, if_match, document_page_range):
277
285
 
278
286
  kwargs = {}
279
287
  if if_match is not None:
@@ -302,6 +310,9 @@ def analyze_document_object_storage_document_details(ctx, from_json, features, d
302
310
  if ocr_data is not None:
303
311
  _details['ocrData'] = cli_util.parse_json_parameter("ocr_data", ocr_data)
304
312
 
313
+ if document_page_range is not None:
314
+ _details['document']['pageRange'] = cli_util.parse_json_parameter("document_page_range", document_page_range)
315
+
305
316
  _details['document']['source'] = 'OBJECT_STORAGE'
306
317
 
307
318
  client = cli_util.build_client('ai_document', 'ai_service_document', ctx)
@@ -321,12 +332,13 @@ def analyze_document_object_storage_document_details(ctx, from_json, features, d
321
332
  @cli_util.option('--document-type', type=custom_types.CliCaseInsensitiveChoice(["INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS", "HEALTH_INSURANCE_ID"]), help=u"""The document type.""")
322
333
  @cli_util.option('--ocr-data', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
323
334
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
324
- @json_skeleton_utils.get_cli_json_input_option({'features': {'module': 'ai_document', 'class': 'list[DocumentFeature]'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'ocr-data': {'module': 'ai_document', 'class': 'AnalyzeDocumentResult'}})
335
+ @cli_util.option('--document-page-range', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The page ranges to be analysed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
336
+ @json_skeleton_utils.get_cli_json_input_option({'features': {'module': 'ai_document', 'class': 'list[DocumentFeature]'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'ocr-data': {'module': 'ai_document', 'class': 'AnalyzeDocumentResult'}, 'document-page-range': {'module': 'ai_document', 'class': 'list[string]'}})
325
337
  @cli_util.help_option
326
338
  @click.pass_context
327
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'features': {'module': 'ai_document', 'class': 'list[DocumentFeature]'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'ocr-data': {'module': 'ai_document', 'class': 'AnalyzeDocumentResult'}}, output_type={'module': 'ai_document', 'class': 'AnalyzeDocumentResult'})
339
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'features': {'module': 'ai_document', 'class': 'list[DocumentFeature]'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'ocr-data': {'module': 'ai_document', 'class': 'AnalyzeDocumentResult'}, 'document-page-range': {'module': 'ai_document', 'class': 'list[string]'}}, output_type={'module': 'ai_document', 'class': 'AnalyzeDocumentResult'})
328
340
  @cli_util.wrap_exceptions
329
- def analyze_document_inline_document_details(ctx, from_json, features, document_data, compartment_id, output_location, language, document_type, ocr_data, if_match):
341
+ def analyze_document_inline_document_details(ctx, from_json, features, document_data, compartment_id, output_location, language, document_type, ocr_data, if_match, document_page_range):
330
342
 
331
343
  kwargs = {}
332
344
  if if_match is not None:
@@ -353,6 +365,9 @@ def analyze_document_inline_document_details(ctx, from_json, features, document_
353
365
  if ocr_data is not None:
354
366
  _details['ocrData'] = cli_util.parse_json_parameter("ocr_data", ocr_data)
355
367
 
368
+ if document_page_range is not None:
369
+ _details['document']['pageRange'] = cli_util.parse_json_parameter("document_page_range", document_page_range)
370
+
356
371
  _details['document']['source'] = 'INLINE'
357
372
 
358
373
  client = cli_util.build_client('ai_document', 'ai_service_document', ctx)
@@ -489,8 +504,11 @@ def change_project_compartment(ctx, from_json, project_id, compartment_id, if_ma
489
504
  @cli_util.option('--display-name', help=u"""A human-friendly name for the model, which can be changed.""")
490
505
  @cli_util.option('--description', help=u"""An optional description of the model.""")
491
506
  @cli_util.option('--model-version', help=u"""The model version""")
507
+ @cli_util.option('--model-sub-type', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Applicable to only PRE_TRAINED_KEY_VALUE_EXTRACTION, PRE_TRAINED_DOCUMENT_ELEMENTS_EXTRACTION.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
508
+ @cli_util.option('--inference-units', type=click.INT, help=u"""Number of replicas required for this model.""")
492
509
  @cli_util.option('--is-quick-mode', type=click.BOOL, help=u"""Set to true when experimenting with a new model type or dataset, so the model training is quick, with a predefined low number of passes through the training data.""")
493
510
  @cli_util.option('--max-training-time-in-hours', help=u"""The maximum model training time in hours, expressed as a decimal fraction.""")
511
+ @cli_util.option('--language', help=u"""The document language for model training, abbreviated according to the BCP 47 syntax.""")
494
512
  @cli_util.option('--training-dataset', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
495
513
  @cli_util.option('--testing-dataset', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
496
514
  @cli_util.option('--validation-dataset', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -503,12 +521,12 @@ This option is a JSON list with items of type ComponentModel. For documentation
503
521
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "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.""")
504
522
  @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.""")
505
523
  @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.""")
506
- @json_skeleton_utils.get_cli_json_input_option({'training-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'testing-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'validation-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'component-models': {'module': 'ai_document', 'class': 'list[ComponentModel]'}, 'freeform-tags': {'module': 'ai_document', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_document', 'class': 'dict(str, dict(str, object))'}})
524
+ @json_skeleton_utils.get_cli_json_input_option({'model-sub-type': {'module': 'ai_document', 'class': 'ModelSubType'}, 'training-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'testing-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'validation-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'component-models': {'module': 'ai_document', 'class': 'list[ComponentModel]'}, 'freeform-tags': {'module': 'ai_document', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_document', 'class': 'dict(str, dict(str, object))'}})
507
525
  @cli_util.help_option
508
526
  @click.pass_context
509
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'training-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'testing-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'validation-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'component-models': {'module': 'ai_document', 'class': 'list[ComponentModel]'}, 'freeform-tags': {'module': 'ai_document', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_document', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_document', 'class': 'Model'})
527
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'model-sub-type': {'module': 'ai_document', 'class': 'ModelSubType'}, 'training-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'testing-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'validation-dataset': {'module': 'ai_document', 'class': 'Dataset'}, 'component-models': {'module': 'ai_document', 'class': 'list[ComponentModel]'}, 'freeform-tags': {'module': 'ai_document', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_document', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_document', 'class': 'Model'})
510
528
  @cli_util.wrap_exceptions
511
- def create_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_type, compartment_id, project_id, display_name, description, model_version, is_quick_mode, max_training_time_in_hours, training_dataset, testing_dataset, validation_dataset, component_models, alias_name, freeform_tags, defined_tags):
529
+ def create_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_type, compartment_id, project_id, display_name, description, model_version, model_sub_type, inference_units, is_quick_mode, max_training_time_in_hours, language, training_dataset, testing_dataset, validation_dataset, component_models, alias_name, freeform_tags, defined_tags):
512
530
 
513
531
  kwargs = {}
514
532
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -527,12 +545,21 @@ def create_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval
527
545
  if model_version is not None:
528
546
  _details['modelVersion'] = model_version
529
547
 
548
+ if model_sub_type is not None:
549
+ _details['modelSubType'] = cli_util.parse_json_parameter("model_sub_type", model_sub_type)
550
+
551
+ if inference_units is not None:
552
+ _details['inferenceUnits'] = inference_units
553
+
530
554
  if is_quick_mode is not None:
531
555
  _details['isQuickMode'] = is_quick_mode
532
556
 
533
557
  if max_training_time_in_hours is not None:
534
558
  _details['maxTrainingTimeInHours'] = max_training_time_in_hours
535
559
 
560
+ if language is not None:
561
+ _details['language'] = language
562
+
536
563
  if training_dataset is not None:
537
564
  _details['trainingDataset'] = cli_util.parse_json_parameter("training_dataset", training_dataset)
538
565
 
@@ -654,15 +681,16 @@ def create_processor_job(ctx, from_json, wait_for_state, max_wait_seconds, wait_
654
681
  @cli_util.option('--processor-config', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
655
682
  @cli_util.option('--input-location-data', required=True, help=u"""Raw document data with Base64 encoding.""")
656
683
  @cli_util.option('--display-name', help=u"""The display name of the processor job.""")
684
+ @cli_util.option('--input-location-page-range', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The page ranges to be analysed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
657
685
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS", "CANCELING"]), 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.""")
658
686
  @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.""")
659
687
  @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.""")
660
- @json_skeleton_utils.get_cli_json_input_option({'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'processor-config': {'module': 'ai_document', 'class': 'ProcessorConfig'}})
688
+ @json_skeleton_utils.get_cli_json_input_option({'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'processor-config': {'module': 'ai_document', 'class': 'ProcessorConfig'}, 'input-location-page-range': {'module': 'ai_document', 'class': 'list[string]'}})
661
689
  @cli_util.help_option
662
690
  @click.pass_context
663
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'processor-config': {'module': 'ai_document', 'class': 'ProcessorConfig'}}, output_type={'module': 'ai_document', 'class': 'ProcessorJob'})
691
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'processor-config': {'module': 'ai_document', 'class': 'ProcessorConfig'}, 'input-location-page-range': {'module': 'ai_document', 'class': 'list[string]'}}, output_type={'module': 'ai_document', 'class': 'ProcessorJob'})
664
692
  @cli_util.wrap_exceptions
665
- def create_processor_job_inline_document_content(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, output_location, compartment_id, processor_config, input_location_data, display_name):
693
+ def create_processor_job_inline_document_content(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, output_location, compartment_id, processor_config, input_location_data, display_name, input_location_page_range):
666
694
 
667
695
  kwargs = {}
668
696
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -677,6 +705,9 @@ def create_processor_job_inline_document_content(ctx, from_json, wait_for_state,
677
705
  if display_name is not None:
678
706
  _details['displayName'] = display_name
679
707
 
708
+ if input_location_page_range is not None:
709
+ _details['inputLocation']['pageRange'] = cli_util.parse_json_parameter("input_location_page_range", input_location_page_range)
710
+
680
711
  _details['inputLocation']['sourceType'] = 'INLINE_DOCUMENT_CONTENT'
681
712
 
682
713
  client = cli_util.build_client('ai_document', 'ai_service_document', ctx)
@@ -772,6 +803,72 @@ def create_processor_job_object_storage_locations(ctx, from_json, wait_for_state
772
803
  cli_util.render_response(result, ctx)
773
804
 
774
805
 
806
+ @processor_job_group.command(name=cli_util.override('ai_document.create_processor_job_invoice_processor_config.command_name', 'create-processor-job-invoice-processor-config'), help=u"""Create a processor job for document analysis. \n[Command Reference](createProcessorJob)""")
807
+ @cli_util.option('--input-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
808
+ @cli_util.option('--output-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
809
+ @cli_util.option('--compartment-id', required=True, help=u"""The compartment identifier.""")
810
+ @cli_util.option('--processor-config-normalization-fields', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
811
+ @cli_util.option('--display-name', help=u"""The display name of the processor job.""")
812
+ @cli_util.option('--processor-config-model-id', help=u"""Unique identifier custom model OCID that should be used for inference.""")
813
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS", "CANCELING"]), 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.""")
814
+ @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.""")
815
+ @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.""")
816
+ @json_skeleton_utils.get_cli_json_input_option({'input-location': {'module': 'ai_document', 'class': 'InputLocation'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'processor-config-normalization-fields': {'module': 'ai_document', 'class': 'NormalizationFields'}})
817
+ @cli_util.help_option
818
+ @click.pass_context
819
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'input-location': {'module': 'ai_document', 'class': 'InputLocation'}, 'output-location': {'module': 'ai_document', 'class': 'OutputLocation'}, 'processor-config-normalization-fields': {'module': 'ai_document', 'class': 'NormalizationFields'}}, output_type={'module': 'ai_document', 'class': 'ProcessorJob'})
820
+ @cli_util.wrap_exceptions
821
+ def create_processor_job_invoice_processor_config(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, input_location, output_location, compartment_id, processor_config_normalization_fields, display_name, processor_config_model_id):
822
+
823
+ kwargs = {}
824
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
825
+
826
+ _details = {}
827
+ _details['processorConfig'] = {}
828
+ _details['inputLocation'] = cli_util.parse_json_parameter("input_location", input_location)
829
+ _details['outputLocation'] = cli_util.parse_json_parameter("output_location", output_location)
830
+ _details['compartmentId'] = compartment_id
831
+ _details['processorConfig']['normalizationFields'] = cli_util.parse_json_parameter("processor_config_normalization_fields", processor_config_normalization_fields)
832
+
833
+ if display_name is not None:
834
+ _details['displayName'] = display_name
835
+
836
+ if processor_config_model_id is not None:
837
+ _details['processorConfig']['modelId'] = processor_config_model_id
838
+
839
+ _details['processorConfig']['processorType'] = 'INVOICE'
840
+
841
+ client = cli_util.build_client('ai_document', 'ai_service_document', ctx)
842
+ result = client.create_processor_job(
843
+ create_processor_job_details=_details,
844
+ **kwargs
845
+ )
846
+ if wait_for_state:
847
+
848
+ if hasattr(client, 'get_processor_job') and callable(getattr(client, 'get_processor_job')):
849
+ try:
850
+ wait_period_kwargs = {}
851
+ if max_wait_seconds is not None:
852
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
853
+ if wait_interval_seconds is not None:
854
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
855
+
856
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
857
+ result = oci.wait_until(client, client.get_processor_job(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
858
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
859
+ # If we fail, we should show an error, but we should still provide the information to the customer
860
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
861
+ cli_util.render_response(result, ctx)
862
+ sys.exit(2)
863
+ except Exception:
864
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
865
+ cli_util.render_response(result, ctx)
866
+ raise
867
+ else:
868
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
869
+ cli_util.render_response(result, ctx)
870
+
871
+
775
872
  @processor_job_group.command(name=cli_util.override('ai_document.create_processor_job_general_processor_config.command_name', 'create-processor-job-general-processor-config'), help=u"""Create a processor job for document analysis. \n[Command Reference](createProcessorJob)""")
776
873
  @cli_util.option('--input-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
777
874
  @cli_util.option('--output-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@@ -1055,6 +1152,34 @@ def get_model(ctx, from_json, model_id):
1055
1152
  cli_util.render_response(result, ctx)
1056
1153
 
1057
1154
 
1155
+ @model_type_info_group.command(name=cli_util.override('ai_document.get_model_type.command_name', 'get-model-type'), help=u"""Gets model capabilities \n[Command Reference](getModelType)""")
1156
+ @cli_util.option('--model-type', required=True, help=u"""The type of the Document model.""")
1157
+ @cli_util.option('--compartment-id', help=u"""The ID of the compartment in which to list resources.""")
1158
+ @cli_util.option('--model-sub-type', help=u"""The sub type based upon model selected.""")
1159
+ @json_skeleton_utils.get_cli_json_input_option({})
1160
+ @cli_util.help_option
1161
+ @click.pass_context
1162
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_document', 'class': 'ModelTypeInfo'})
1163
+ @cli_util.wrap_exceptions
1164
+ def get_model_type(ctx, from_json, model_type, compartment_id, model_sub_type):
1165
+
1166
+ if isinstance(model_type, six.string_types) and len(model_type.strip()) == 0:
1167
+ raise click.UsageError('Parameter --model-type cannot be whitespace or empty string')
1168
+
1169
+ kwargs = {}
1170
+ if compartment_id is not None:
1171
+ kwargs['compartment_id'] = compartment_id
1172
+ if model_sub_type is not None:
1173
+ kwargs['model_sub_type'] = model_sub_type
1174
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1175
+ client = cli_util.build_client('ai_document', 'ai_service_document', ctx)
1176
+ result = client.get_model_type(
1177
+ model_type=model_type,
1178
+ **kwargs
1179
+ )
1180
+ cli_util.render_response(result, ctx)
1181
+
1182
+
1058
1183
  @processor_job_group.command(name=cli_util.override('ai_document.get_processor_job.command_name', 'get'), help=u"""Get the details of a processor job. \n[Command Reference](getProcessorJob)""")
1059
1184
  @cli_util.option('--processor-job-id', required=True, help=u"""Processor job id.""")
1060
1185
  @json_skeleton_utils.get_cli_json_input_option({})
@@ -1613,6 +1738,7 @@ def remove_project_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
1613
1738
  @cli_util.option('--model-id', required=True, help=u"""A unique model identifier.""")
1614
1739
  @cli_util.option('--display-name', help=u"""A human-friendly name of the model, which can be changed.""")
1615
1740
  @cli_util.option('--description', help=u"""An optional description of the model.""")
1741
+ @cli_util.option('--inference-units', type=click.INT, help=u"""Number of replicas required for this model.""")
1616
1742
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. For example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1617
1743
  @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. For example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1618
1744
  @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
@@ -1626,7 +1752,7 @@ def remove_project_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
1626
1752
  @click.pass_context
1627
1753
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_document', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_document', 'class': 'dict(str, dict(str, object))'}})
1628
1754
  @cli_util.wrap_exceptions
1629
- def update_model(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, model_id, display_name, description, freeform_tags, defined_tags, if_match, is_lock_override):
1755
+ def update_model(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, model_id, display_name, description, inference_units, freeform_tags, defined_tags, if_match, is_lock_override):
1630
1756
 
1631
1757
  if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
1632
1758
  raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
@@ -1650,6 +1776,9 @@ def update_model(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_i
1650
1776
  if description is not None:
1651
1777
  _details['description'] = description
1652
1778
 
1779
+ if inference_units is not None:
1780
+ _details['inferenceUnits'] = inference_units
1781
+
1653
1782
  if freeform_tags is not None:
1654
1783
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
1655
1784
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  import click
6
6
  import json
7
+ import os
7
8
 
8
9
  from oci_cli.cli_util import get_param
9
10
  from services.log_analytics.src.oci_cli_log_analytics.generated import loganalytics_cli
@@ -1083,9 +1084,19 @@ cli_util.rename_command(loganalytics_cli, loganalytics_cli.log_analytics_field_g
1083
1084
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1084
1085
  @cli_util.wrap_exceptions
1085
1086
  def upload_otlp_logs_extended(ctx, **kwargs):
1086
-
1087
- if 'file' in kwargs:
1088
- kwargs['upload_otlp_logs_details'] = kwargs['file']
1089
- kwargs.pop('file')
1090
-
1091
- ctx.invoke(loganalytics_cli.upload_otlp_logs, **kwargs)
1087
+ # Set "--upload_otlp_logs_details" to file's "--file" handle
1088
+ upload_file = kwargs['file']
1089
+ del kwargs['file']
1090
+ if os.path.exists(upload_file):
1091
+ if kwargs['content_type'] == 'application/json':
1092
+ with open(upload_file, 'r') as ufile:
1093
+ file_content = ufile.read()
1094
+ kwargs['upload_otlp_logs_details'] = file_content
1095
+ ctx.invoke(loganalytics_cli.upload_otlp_logs, **kwargs)
1096
+ else:
1097
+ with open(upload_file, 'rb') as ufile:
1098
+ kwargs['upload_otlp_logs_details'] = ufile
1099
+ ctx.invoke(loganalytics_cli.upload_otlp_logs, **kwargs)
1100
+ else:
1101
+ kwargs['upload_otlp_logs_details'] = upload_file
1102
+ ctx.invoke(loganalytics_cli.upload_otlp_logs, **kwargs)