NosqlClient

class oci.nosql.NosqlClient(config, **kwargs)

The control plane API for NoSQL Database Cloud Service HTTPS provides endpoints to perform NDCS operations, including creation and deletion of tables and indexes; population and access of data in tables; and access of table usage metrics.

Methods

__init__(config, **kwargs) Creates a new service client
change_table_compartment(table_name_or_id, …) Change a table’s compartment.
create_index(table_name_or_id, …) Create a new index on the table identified by tableNameOrId.
create_replica(table_name_or_id, …) Add a replica for this table
create_table(create_table_details, **kwargs) Create a new table.
delete_index(table_name_or_id, index_name, …) Delete an index from the table identified by tableNameOrId.
delete_replica(table_name_or_id, region, …) Delete the specified replica table in the remote region.
delete_row(table_name_or_id, key, **kwargs) Delete a single row from the table, by primary key.
delete_table(table_name_or_id, **kwargs) Delete a table by tableNameOrId.
delete_work_request(work_request_id, **kwargs) Cancel a work request operation with the given ID.
get_index(table_name_or_id, index_name, **kwargs) Get information about a single index.
get_row(table_name_or_id, key, **kwargs) Get a single row from the table by primary key.
get_table(table_name_or_id, **kwargs) Get table info by identifier.
get_work_request(work_request_id, **kwargs) Get the status of the work request with the given ID.
list_indexes(table_name_or_id, **kwargs) Get a list of indexes on a table.
list_table_usage(table_name_or_id, **kwargs) Get table usage info.
list_tables(compartment_id, **kwargs) Get a list of tables in a compartment.
list_work_request_errors(work_request_id, …) Return a (paginated) list of errors for a given work request.
list_work_request_logs(work_request_id, **kwargs) Return a (paginated) list of logs for a given work request.
list_work_requests(compartment_id, **kwargs) List the work requests in a compartment.
prepare_statement(compartment_id, statement, …) Prepare a SQL statement for use in a query with variable substitution.
query(query_details, **kwargs) Execute a SQL query.
summarize_statement(compartment_id, …) Check the syntax and return a brief summary of a SQL statement.
update_row(table_name_or_id, …) Write a single row into the table.
update_table(table_name_or_id, …) Alter the table identified by tableNameOrId,
__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.
change_table_compartment(table_name_or_id, change_table_compartment_details, **kwargs)

Change a table’s compartment.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • change_table_compartment_details (oci.nosql.models.ChangeTableCompartmentDetails) – (required) Specifications of the source and target compartments.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • if_match (str) – (optional) 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.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 change_table_compartment API.

create_index(table_name_or_id, create_index_details, **kwargs)

Create a new index on the table identified by tableNameOrId.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • create_index_details (oci.nosql.models.CreateIndexDetails) – (required) Specifications for the new index.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 create_index API.

create_replica(table_name_or_id, create_replica_details, **kwargs)

Add a replica for this table

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • create_replica_details (oci.nosql.models.CreateReplicaDetails) – (required) Specifications for the new replica
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • if_match (str) – (optional) 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.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 create_replica API.

create_table(create_table_details, **kwargs)

Create a new table.

Parameters:
  • create_table_details (oci.nosql.models.CreateTableDetails) – (required) Specifications for the new table.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 create_table API.

delete_index(table_name_or_id, index_name, **kwargs)

Delete an index from the table identified by tableNameOrId.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • index_name (str) – (required) The name of a table’s index.
  • compartment_id (str) – (optional) The ID of a table’s compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
  • is_if_exists (bool) – (optional) Set as true to select “if exists” behavior.
  • if_match (str) – (optional) 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.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. 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_index API.

delete_replica(table_name_or_id, region, **kwargs)

Delete the specified replica table in the remote region.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • region (str) – (required) A customer-facing region identifier
  • compartment_id (str) – (optional) The ID of a table’s compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
  • if_match (str) – (optional) 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.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. 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_replica API.

delete_row(table_name_or_id, key, **kwargs)

Delete a single row from the table, by primary key.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • key (oci.nosql.models.list[str]) – (required) An array of strings, each of the format “column-name:value”, representing the primary key of the row.
  • compartment_id (str) – (optional) The ID of a table’s compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
  • is_get_return_row (bool) – (optional) If true, and the operation fails due to an option setting (ifVersion et al), then the existing row will be returned.
  • timeout_in_ms (int) – (optional) Timeout setting for this operation.
  • if_match (str) – (optional) 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.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. 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 DeleteRowResult

Return type:

Response

Example:

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

delete_table(table_name_or_id, **kwargs)

Delete a table by tableNameOrId.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • compartment_id (str) – (optional) The ID of a table’s compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
  • is_if_exists (bool) – (optional) Set as true to select “if exists” behavior.
  • if_match (str) – (optional) 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.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. 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_table API.

delete_work_request(work_request_id, **kwargs)

Cancel a work request operation with the given ID.

Parameters:
  • work_request_id (str) – (required) The ID of the asynchronous request.
  • if_match (str) – (optional) 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.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. 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_work_request API.

get_index(table_name_or_id, index_name, **kwargs)

Get information about a single index.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • index_name (str) – (required) The name of a table’s index.
  • compartment_id (str) – (optional) The ID of a table’s compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 Index

Return type:

Response

Example:

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

get_row(table_name_or_id, key, **kwargs)

Get a single row from the table by primary key.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • key (oci.nosql.models.list[str]) – (required) An array of strings, each of the format “column-name:value”, representing the primary key of the row.
  • compartment_id (str) – (optional) The ID of a table’s compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
  • consistency (str) –

    (optional) Consistency requirement for a read operation.

    Allowed values are: “EVENTUAL”, “ABSOLUTE”

  • timeout_in_ms (int) – (optional) Timeout setting for this operation.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 Row

Return type:

Response

Example:

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

get_table(table_name_or_id, **kwargs)

Get table info by identifier.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • compartment_id (str) – (optional) The ID of a table’s compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 Table

Return type:

Response

Example:

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

get_work_request(work_request_id, **kwargs)

Get the status of the work request with the given ID.

Parameters:
  • work_request_id (str) – (required) The ID of the asynchronous request.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 WorkRequest

Return type:

Response

Example:

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

list_indexes(table_name_or_id, **kwargs)

Get a list of indexes on a table.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • compartment_id (str) – (optional) The ID of a table’s compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
  • name (str) – (optional) A shell-globbing-style (*?[]) filter for names.
  • lifecycle_state (str) –

    (optional) Filter list by the lifecycle state of the item.

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

  • limit (int) – (optional) The maximum number of items to return.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • sort_order (str) –

    (optional) The sort order to use, either ‘ASC’ or ‘DESC’.

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified timeCreated is default.

    Allowed values are: “timeCreated”, “name”

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 IndexCollection

Return type:

Response

Example:

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

list_table_usage(table_name_or_id, **kwargs)

Get table usage info.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • compartment_id (str) – (optional) The ID of a table’s compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • time_start (datetime) – (optional) The start time to use for the request. If no time range is set for this request, the most recent complete usage record is returned.
  • time_end (datetime) – (optional) The end time to use for the request.
  • limit (int) – (optional) The maximum number of items to return.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • 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 TableUsageCollection

Return type:

Response

Example:

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

list_tables(compartment_id, **kwargs)

Get a list of tables in a compartment.

Parameters:
  • compartment_id (str) – (required) The ID of a table’s compartment.
  • name (str) – (optional) A shell-globbing-style (*?[]) filter for names.
  • limit (int) – (optional) The maximum number of items to return.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • sort_order (str) –

    (optional) The sort order to use, either ‘ASC’ or ‘DESC’.

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified timeCreated is default.

    Allowed values are: “timeCreated”, “name”

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • lifecycle_state (str) –

    (optional) Filter list by the lifecycle state of the item.

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

  • 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 TableCollection

Return type:

Response

Example:

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

list_work_request_errors(work_request_id, **kwargs)

Return a (paginated) list of errors for a given work request.

Parameters:
  • work_request_id (str) – (required) The ID of the asynchronous request.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • limit (int) – (optional) The maximum number of items to return.
  • 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 WorkRequestErrorCollection

Return type:

Response

Example:

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

list_work_request_logs(work_request_id, **kwargs)

Return a (paginated) list of logs for a given work request.

Parameters:
  • work_request_id (str) – (required) The ID of the asynchronous request.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • limit (int) – (optional) The maximum number of items to return.
  • 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 WorkRequestLogEntryCollection

Return type:

Response

Example:

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

list_work_requests(compartment_id, **kwargs)

List the work requests in a compartment.

Parameters:
  • compartment_id (str) – (required) The ID of a table’s compartment.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • limit (int) – (optional) The maximum number of items to return.
  • 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 WorkRequestCollection

Return type:

Response

Example:

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

prepare_statement(compartment_id, statement, **kwargs)

Prepare a SQL statement for use in a query with variable substitution.

Parameters:
  • compartment_id (str) – (required) The ID of a table’s compartment.
  • statement (str) – (required) A NoSQL SQL statement.
  • is_get_query_plan (bool) – (optional) Include a query execution plan in the result.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 PreparedStatement

Return type:

Response

Example:

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

query(query_details, **kwargs)

Execute a SQL query.

Parameters:
  • query_details (oci.nosql.models.QueryDetails) – (required) SQL query statement and ancillary information.
  • limit (int) – (optional) The maximum number of items to return.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. 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 QueryResultCollection

Return type:

Response

Example:

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

summarize_statement(compartment_id, statement, **kwargs)

Check the syntax and return a brief summary of a SQL statement.

Parameters:
  • compartment_id (str) – (required) The ID of a table’s compartment.
  • statement (str) – (required) A NoSQL SQL statement.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 StatementSummary

Return type:

Response

Example:

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

update_row(table_name_or_id, update_row_details, **kwargs)

Write a single row into the table.

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • update_row_details (oci.nosql.models.UpdateRowDetails) – (required) Specifications for the putting of a table row.
  • if_match (str) – (optional) 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.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. 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 UpdateRowResult

Return type:

Response

Example:

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

update_table(table_name_or_id, update_table_details, **kwargs)

Alter the table identified by tableNameOrId, changing schema, limits, or tags

Parameters:
  • table_name_or_id (str) – (required) A table name within the compartment, or a table OCID.
  • update_table_details (oci.nosql.models.UpdateTableDetails) – (required) Specifications for the alteration.
  • if_match (str) – (optional) 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.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • 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 will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. 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 update_table API.