OdapackageClient

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

API to create and maintain Oracle Digital Assistant service instances.

Methods

__init__(config, **kwargs) Creates a new service client
create_imported_package(…) Starts an asynchronous job to import a package into a Digital Assistant instance.
delete_imported_package(oda_instance_id, …) Starts an asynchronous job to delete a package from a Digital Assistant instance.
get_imported_package(oda_instance_id, …) Returns a list of summaries for imported packages in the instance.
get_package(oda_instance_id, package_id, …) Returns details about a package, and how to import it.
list_imported_packages(oda_instance_id, **kwargs) Returns a list of summaries for imported packages in the instance.
list_packages(**kwargs) Returns a page of summaries for packages that are available for import.
update_imported_package(…) Starts an asynchronous job to update a package within a Digital Assistant instance.
__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.

  • circuit_breaker_strategy (obj) – (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses DEFAULT_CIRCUIT_BREAKER_STRATEGY as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described here.
  • circuit_breaker_callback (function) – (optional) Callback function to receive any exceptions triggerred by the circuit breaker.
  • client_level_realm_specific_endpoint_template_enabled (bool) – (optional) A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None.
  • allow_control_chars – (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object.
create_imported_package(create_imported_package_details, oda_instance_id, **kwargs)

Starts an asynchronous job to import a package into 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_imported_package_details (oci.oda.models.CreateImportedPackageDetails) – (required) Parameter values required to import the package.
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • 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.

  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ImportedPackage

Return type:

Response

Example:

Click here to see an example of how to use create_imported_package API.

delete_imported_package(oda_instance_id, package_id, **kwargs)

Starts an asynchronous job to delete a package from 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:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • package_id (str) – (required) Unique Digital Assistant package identifier.
  • 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.

  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_imported_package API.

get_imported_package(oda_instance_id, package_id, **kwargs)

Returns a list of summaries for imported packages in the instance.

Parameters:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • package_id (str) – (required) Unique Digital Assistant package 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ImportedPackage

Return type:

Response

Example:

Click here to see an example of how to use get_imported_package API.

get_package(oda_instance_id, package_id, **kwargs)

Returns details about a package, and how to import it.

Parameters:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • package_id (str) – (required) Unique Digital Assistant package 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Package

Return type:

Response

Example:

Click here to see an example of how to use get_package API.

list_imported_packages(oda_instance_id, **kwargs)

Returns a list of summaries for imported packages in the instance.

Parameters:
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • name (str) –

    (optional) List only the information for the package with this name. Package names are unique to a publisher and may not change.

    Example: My Package

  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of ImportedPackageSummary

Return type:

Response

Example:

Click here to see an example of how to use list_imported_packages API.

list_packages(**kwargs)

Returns a page of summaries for packages that are available for import. The optional odaInstanceId query parameter can be used to filter packages that are available for import by a specific instance. If odaInstanceId query parameter is not provided, the returned list will include packages available within the region indicated by the request URL. The optional resourceType query param may be specified to filter packages that contain the indicated resource type. If no resourceType query param is given, packages containing all resource types will be returned. The optional name query parameter can be used to limit the list to packages whose name matches the given name. The optional displayName query parameter can be used to limit the list to packages whose displayName matches the given name. The optional isLatestVersionOnly query parameter can be used to limit the returned list to include only the latest version of any given package. If not specified, all versions of any otherwise matching package will be returned.

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:
  • oda_instance_id (str) – (optional) List only the information for this Digital Assistant instance.
  • resource_type (str) – (optional) Resource type identifier. Used to limit query results to the items which are applicable to the given type.
  • compartment_id (str) – (optional) List the packages that belong to this compartment.
  • name (str) –

    (optional) List only the information for the package with this name. Package names are unique to a publisher and may not change.

    Example: My Package

  • 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

  • is_latest_version_only (bool) – (optional) Should we return only the latest version of a package (instead of all versions)?
  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of PackageSummary

Return type:

Response

Example:

Click here to see an example of how to use list_packages API.

update_imported_package(update_imported_package_details, oda_instance_id, package_id, **kwargs)

Starts an asynchronous job to update a package within 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:
  • update_imported_package_details (oci.oda.models.UpdateImportedPackageDetails) – (required) Parameter values required to import the package, with updated values.
  • oda_instance_id (str) – (required) Unique Digital Assistant instance identifier.
  • package_id (str) – (required) Unique Digital Assistant package identifier.
  • is_replace_skills (bool) – (optional) Should old skills be replaced by new skills if packageId differs from already imported package?
  • 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.

  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ImportedPackage

Return type:

Response

Example:

Click here to see an example of how to use update_imported_package API.