OdaClient

class oci.oda.OdaClient(config, **kwargs)

API to create and maintain Oracle Digital Assistant service instances.

Methods

__init__(config, **kwargs) Creates a new service client
change_oda_instance_compartment(…) Moves an Digital Assistant instance into a different compartment.
create_oda_instance(…) Create Digital Assistant Instance Starts an asynchronous job to create a Digital Assistant instance.
delete_oda_instance(oda_instance_id, **kwargs) Delete Digital Assistant Instance Starts an asynchronous job to delete the specified Digital Assistant instance.
get_oda_instance(oda_instance_id, **kwargs) Get Digital Assistant Instance Gets the specified Digital Assistant instance.
get_work_request(work_request_id, **kwargs) Get Work Request Gets information about the work request with the specified ID, including its status.
list_oda_instances(compartment_id, **kwargs) Get Compartment’s Digital Assistant Instances Returns a page of Digital Assistant instances that belong to the specified compartment.
list_work_request_errors(work_request_id, …) List Work Request Errors Returns a page of errors for the specified work request.
list_work_request_logs(work_request_id, **kwargs) List Work Request Log Messages Returns a page of of log messages for a given work request.
list_work_requests(compartment_id, **kwargs) List Compartment’s Work Requests Returns a page of work requests for the specified compartment.
start_oda_instance(oda_instance_id, **kwargs) Starts an inactive Digital Assistant instance.
stop_oda_instance(oda_instance_id, **kwargs) Stops an active Digital Assistant instance.
update_oda_instance(oda_instance_id, …) Update Digital Assistant Instance Updates the specified Digital Assistant instance with the information in the request body.
__init__(config, **kwargs)

Creates a new service client

Parameters:
  • config (dict) – Configuration keys and values as per SDK and Tool Configuration. The from_file() method can be used to load configuration from a file. Alternatively, a dict can be passed. You can validate_config the dict using validate_config()
  • service_endpoint (str) – (optional) The endpoint of the service to call using this client. For example https://iaas.us-ashburn-1.oraclecloud.com. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint.
  • timeout (float or tuple(float, float)) – (optional) The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
  • signer (AbstractBaseSigner) –

    (optional) The signer to use when signing requests made by the service client. The default is to use a Signer based on the values provided in the config parameter.

    One use case for this parameter is for Instance Principals authentication by passing an instance of InstancePrincipalsSecurityTokenSigner as the value for this keyword argument

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a retry_strategy keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

change_oda_instance_compartment(oda_instance_id, change_oda_instance_compartment_details, **kwargs)

Moves an Digital Assistant instance into a different compartment. Moves an Digital Assistant instance into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • change_oda_instance_compartment_details (ChangeOdaInstanceCompartmentDetails) – (required) The compartment to which the Digital Assistant instance should be moved.
  • if_match (str) – (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the if-match query parameter to the value of the ETAG header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance’s current etag value.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • opc_retry_token (str) –

    (optional) A token that uniquely identifies a request so that you can retry the request if there’s a timeout or server error without the risk of executing that same action again.

    Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

create_oda_instance(create_oda_instance_details, **kwargs)

Create Digital Assistant Instance Starts an asynchronous job to create a Digital Assistant instance.

To monitor the status of the job, take the opc-work-request-id response header value and use it to call GET /workRequests/{workRequestID}.

Parameters:
  • create_oda_instance_details (CreateOdaInstanceDetails) – (required) Details for the new Digital Assistant instance.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • opc_retry_token (str) –

    (optional) A token that uniquely identifies a request so that you can retry the request if there’s a timeout or server error without the risk of executing that same action again.

    Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type OdaInstance

Return type:

Response

delete_oda_instance(oda_instance_id, **kwargs)

Delete Digital Assistant Instance Starts an asynchronous job to delete the specified Digital Assistant instance. To monitor the status of the job, take the opc-work-request-id response header value and use it to call GET /workRequests/{workRequestID}.

Parameters:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • if_match (str) – (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the if-match query parameter to the value of the ETAG header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance’s current etag value.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

get_oda_instance(oda_instance_id, **kwargs)

Get Digital Assistant Instance Gets the specified Digital Assistant instance.

Parameters:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type OdaInstance

Return type:

Response

get_work_request(work_request_id, **kwargs)

Get Work Request Gets information about the work request with the specified ID, including its status.

You can use this operation to monitor the status of jobs that you requested to create, delete, and update instances.

Parameters:
  • work_request_id (str) – (required) The identifier of the asynchronous work request.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type WorkRequest

Return type:

Response

list_oda_instances(compartment_id, **kwargs)

Get Compartment’s Digital Assistant Instances Returns a page of Digital Assistant instances that belong to the specified compartment.

If the opc-next-page header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header’s value as the page query parameter.

Parameters:
  • compartment_id (str) – (required) List the Digital Assistant instances that belong to this compartment.
  • display_name (str) –

    (optional) List only the information for the Digital Assistant instance with this user-friendly name. These names don’t have to be unique and may change.

    Example: My new resource

  • lifecycle_state (str) –

    (optional) List only the Digital Assistant instances that are in this lifecycle state.

    Allowed values are: “CREATING”, “UPDATING”, “ACTIVE”, “INACTIVE”, “DELETING”, “DELETED”, “FAILED”

  • limit (int) – (optional) The maximum number of items to return per page.
  • page (str) –

    (optional) The page at which to start retrieving results.

    You get this value from the opc-next-page header in a previous list request. To retireve the first page, omit this query parameter.

    Example: MToxMA==

  • sort_order (str) –

    (optional) Sort the results in this order, use either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Sort on this field. You can specify one sort order only. The default sort field is TIMECREATED.

    The default sort order for TIMECREATED is descending, and the default sort order for DISPLAYNAME is ascending.

    Allowed values are: “TIMECREATED”, “DISPLAYNAME”

  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of OdaInstanceSummary

Return type:

Response

list_work_request_errors(work_request_id, **kwargs)

List Work Request Errors Returns a page of errors for the specified work request.

If the opc-next-page header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header’s value as the page query parameter.

Parameters:
  • work_request_id (str) – (required) The identifier of the asynchronous work request.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • page (str) –

    (optional) The page at which to start retrieving results.

    You get this value from the opc-next-page header in a previous list request. To retireve the first page, omit this query parameter.

    Example: MToxMA==

  • limit (int) – (optional) The maximum number of items to return per page.
  • sort_by (str) –

    (optional) The field to sort by. You can specify only one sort order. If no value is specified, then the default is TIMESTAMP.

    The default sort order for both TIMESTAMP and CODE is ascending.

    Allowed values are: “CODE”, “TIMESTAMP”

  • sort_order (str) –

    (optional) Sort the results in this order, use either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of WorkRequestError

Return type:

Response

list_work_request_logs(work_request_id, **kwargs)

List Work Request Log Messages Returns a page of of log messages for a given work request.

If the opc-next-page header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header’s value as the page query parameter.

Parameters:
  • work_request_id (str) – (required) The identifier of the asynchronous work request.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • page (str) –

    (optional) The page at which to start retrieving results.

    You get this value from the opc-next-page header in a previous list request. To retireve the first page, omit this query parameter.

    Example: MToxMA==

  • limit (int) – (optional) The maximum number of items to return per page.
  • sort_by (str) –

    (optional) The field to sort by. You can specify only one sort order. If no value is specified, then the default is TIMESTAMP.

    The default sort order for both TIMESTAMP and MESSAGE is ascending.

    Allowed values are: “MESSAGE”, “TIMESTAMP”

  • sort_order (str) –

    (optional) Sort the results in this order, use either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of WorkRequestLogEntry

Return type:

Response

list_work_requests(compartment_id, **kwargs)

List Compartment’s Work Requests Returns a page of work requests for the specified compartment.

If the opc-next-page header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header’s value as the page query parameter.

Parameters:
  • compartment_id (str) – (required) List the Digital Assistant instances that belong to this compartment.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • oda_instance_id (str) – (optional) List only the information for this Digital Assistant instance.
  • page (str) –

    (optional) The page at which to start retrieving results.

    You get this value from the opc-next-page header in a previous list request. To retireve the first page, omit this query parameter.

    Example: MToxMA==

  • limit (int) – (optional) The maximum number of items to return per page.
  • sort_by (str) –

    (optional) The field to sort by. You can specify only one sort order. If no value is specified, then the default is TIME_ACCEPTED.

    The default sort order for the time fields is descending. The default order for DISPLAYNAME and STATUS is ascending.default: TIME_ACCEPTED

    Allowed values are: “OPERATION_TYPE”, “STATUS”, “TIME_ACCEPTED”, “TIME_STARTED”, “TIME_FINISHED”

  • sort_order (str) –

    (optional) Sort the results in this order, use either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of WorkRequestSummary

Return type:

Response

start_oda_instance(oda_instance_id, **kwargs)

Starts an inactive Digital Assistant instance. Starts an inactive Digital Assistant instance. Once active, the instance will be accessible and metering of requests will be started again.

Parameters:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • if_match (str) – (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the if-match query parameter to the value of the ETAG header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance’s current etag value.
  • opc_retry_token (str) –

    (optional) A token that uniquely identifies a request so that you can retry the request if there’s a timeout or server error without the risk of executing that same action again.

    Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

stop_oda_instance(oda_instance_id, **kwargs)

Stops an active Digital Assistant instance. Stops an active Digital Assistant instance. Once inactive, the instance will not be accessible and metering of requests will be stopped until the instance is started again. Data associated with the instance is not affected.

Parameters:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • if_match (str) – (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the if-match query parameter to the value of the ETAG header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance’s current etag value.
  • opc_retry_token (str) –

    (optional) A token that uniquely identifies a request so that you can retry the request if there’s a timeout or server error without the risk of executing that same action again.

    Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

update_oda_instance(oda_instance_id, update_oda_instance_details, **kwargs)

Update Digital Assistant Instance Updates the specified Digital Assistant instance with the information in the request body.

Parameters:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • update_oda_instance_details (UpdateOdaInstanceDetails) – (required) The information to update.
  • if_match (str) – (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the if-match query parameter to the value of the ETAG header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance’s current etag value.
  • opc_request_id (str) – (optional) The client request ID for tracing. This value is included in the opc-request-id response header.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type OdaInstance

Return type:

Response