GetTableRequest

class borneo.GetTableRequest[source]

Bases: borneo.operations.Request

Represents the argument of a NoSQLHandle.get_table() operation which returns static information associated with a table, as returned in TableResult. This information only changes in response to a change in table schema or a change in provisioned throughput or capacity for the table.

The table name is a required parameter.

Methods Summary

get_compartment() Cloud service only.
get_operation_id() Returns the operation id to use for the request, None if not set.
get_table_name() Returns the table name to use for the operation.
get_timeout() Returns the timeout to use for the operation, in milliseconds.
set_compartment(compartment) Cloud service only.
set_operation_id(operation_id) Sets the operation id to use for the request.
set_table_name(table_name) Sets the table name to use for the request.
set_timeout(timeout_ms) Sets the request timeout value, in milliseconds.

Methods Documentation

get_compartment()

Cloud service only.

Get the compartment id or name if set for the request.

Returns:compartment id or name if set for the request, otherwise None if not set.
Return type:str
get_operation_id()[source]

Returns the operation id to use for the request, None if not set.

Returns:the operation id.
Return type:str
get_table_name()

Returns the table name to use for the operation.

Returns:the table name, or None if not set.
Returns:str
get_timeout()[source]

Returns the timeout to use for the operation, in milliseconds. A value of 0 indicates that the timeout has not been set.

Returns:the timeout value.
Return type:int
set_compartment(compartment)[source]

Cloud service only.

Sets the name or id of a compartment to be used for this operation.

The compartment may be specified as either a name (or path for nested compartments) or as an id (OCID). A name (vs id) can only be used when authenticated using a specific user identity. It is not available if authenticated as an Instance Principal which can be done when calling the service from a compute instance in the Oracle Cloud Infrastructure. See borneo.iam.SignatureProvider.create_with_instance_principal().

Parameters:compartment (str) – the compartment name or id. If using a nested compartment, specify the full compartment path compartmentA.compartmentB, but exclude the name of the root compartment (tenant).
Returns:self.
Raises:IllegalArgumentException – raises the exception if compartment is not a str.
set_operation_id(operation_id)[source]

Sets the operation id to use for the request. The operation id can be obtained via TableResult.get_operation_id(). This parameter is optional. If non-none, it represents an asynchronous table operation that may be in progress. It is used to examine the result of the operation and if the operation has failed an exception will be thrown in response to a NoSQLHandle.get_table() operation. If the operation is in progress or has completed successfully, the state of the table is returned.

Parameters:operation_id (str) – the operation id. This is optional.
Returns:self.
Raises:IllegalArgumentException – raises the exception if operation_id is a negative number.
set_table_name(table_name)[source]

Sets the table name to use for the request.

Parameters:table_name (str) – the table name. This is a required parameter.
Returns:self.
Raises:IllegalArgumentException – raises the exception if table_name is not a string.
set_timeout(timeout_ms)[source]

Sets the request timeout value, in milliseconds. This overrides any default value set in NoSQLHandleConfig. The value must be positive.

Parameters:timeout_ms (int) – the timeout value, in milliseconds.
Returns:self.
Raises:IllegalArgumentException – raises the exception if the timeout value is less than or equal to 0.