You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: services/ai_speech/src/oci_cli_ai_service_speech/generated/aiservicespeech_cli.py
+64Lines changed: 64 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -373,6 +373,70 @@ def create_transcription_job_object_list_inline_input_location(ctx, from_json, w
373
373
cli_util.render_response(result, ctx)
374
374
375
375
376
+
@transcription_job_group.command(name=cli_util.override('speech.delete_transcription_job.command_name', 'delete'), help=u"""Delete API cleans job, tasks and the related metadata. However the generated transcriptions in customer tenancy will not be deleted. \n[Command Reference](deleteTranscriptionJob)""")
@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.""")
379
+
@cli_util.confirm_delete_option
380
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED"]), 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.""")
381
+
@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.""")
382
+
@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.""")
# We make an initial service call so we can pass the result to oci.wait_until(), however if we are waiting on the
416
+
# outcome of a delete operation it is possible that the resource is already gone and so the initial service call
417
+
# will result in an exception that reflects a HTTP 404. In this case, we can exit with success (rather than raising
418
+
# the exception) since this would have been the behaviour in the waiter anyway (as for delete we provide the argument
419
+
# succeed_on_not_found=True to the waiter).
420
+
#
421
+
# Any non-404 should still result in the exception being thrown.
422
+
ife.status==404:
423
+
pass
424
+
else:
425
+
raise
426
+
exceptoci.exceptions.MaximumWaitTimeExceededase:
427
+
# If we fail, we should show an error, but we should still provide the information to the customer
428
+
click.echo('Failed to wait until the resource entered the specified state. Please retrieve the resource to find its current state', file=sys.stderr)
429
+
cli_util.render_response(result, ctx)
430
+
sys.exit(2)
431
+
exceptException:
432
+
click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
433
+
cli_util.render_response(result, ctx)
434
+
raise
435
+
else:
436
+
click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
437
+
cli_util.render_response(result, ctx)
438
+
439
+
376
440
@transcription_job_group.command(name=cli_util.override('speech.get_transcription_job.command_name', 'get'), help=u"""Gets a Transcription Job by identifier \n[Command Reference](getTranscriptionJob)""")
@container_group.command(name=cli_util.override('container_instances.retrieve_logs.command_name', 'retrieve-logs'), help=u"""Retrieves recent logs from the specified container. The most recent 256 KB of logs are returned. \n[Command Reference](retrieveLogs)""")
811
+
@container_group.command(name=cli_util.override('container_instances.retrieve_logs.command_name', 'retrieve-logs'), help=u"""Returns the most recent 256 KB of logs from the specified container. \n[Command Reference](retrieveLogs)""")
812
812
@cli_util.option('--container-id', required=True, help=u"""The [OCID] of the container.""")
813
813
@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.")
814
-
@cli_util.option('--is-previous', type=click.BOOL, help=u"""Returns the logs for the previous run of the container in a pod if the pod exists. If the container fails for some reason, this parameter is useful to determine the root cause of the failure.""")
814
+
@cli_util.option('--is-previous', type=click.BOOL, help=u"""Returns the logs for the previous run of the container in a pod. If the container fails, this parameter can help you to determine the root cause of the failure.""")
Copy file name to clipboardExpand all lines: services/generative_ai_inference/src/oci_cli_generative_ai_inference/generative_ai_inference_cli_extended.py
0 commit comments