AddReplicaRequest¶
- class borneo.AddReplicaRequest[source]¶
Bases:
RequestCloud service only
AddReplicaRequest is used to add a new replica (region) to a table
Added in version 5.4.2.
Methods Summary
Get the compartment id or name if set for the request.
Gets the match etag or None if not set
Returns the read units to use for the replica table.
Returns the replica name.
Returns the table name to use for the operation.
Returns the timeout to use for the operation, in milliseconds.
Returns the write units to use on the replica table.
set_compartment(compartment)Sets the name or id of a compartment to be used for this operation.
set_match_etag(etag)Sets a ETag to match for the operation to proceed.
set_read_units(read_units)Sets the read units for the replica table.
set_replica_name(replica_name)Sets the replica name(region) to be added.
set_table_name(table_name)Sets the table name to replicate.
set_timeout(timeout_ms)Sets the request timeout value, in milliseconds.
set_write_units(write_units)Sets the write units for the replica table.
Methods Documentation
- get_compartment()¶
Get the compartment id or name if set for the request.
Cloud service only.
- Returns:
compartment id or name if set for the request, otherwise None if not set.
- Return type:
str
- get_match_etag()[source]¶
Gets the match etag or None if not set
- Returns:
the match etag or None if not set
- Return type:
str
- get_replica_name()[source]¶
Returns the replica name.
- Returns:
the replica name, or None if not set.
- Returns:
str
- get_read_units()[source]¶
Returns the read units to use for the replica table. 0 if not set
- Returns:
the read units.
- Return type:
int
- 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()¶
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
- get_write_units()[source]¶
Returns the write units to use on the replica table. 0 if not set.
- Returns:
the write units.
- Return type:
int
- set_compartment(compartment)[source]¶
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_match_etag(etag)[source]¶
Sets a ETag to match for the operation to proceed. The ETag must be non-null and have been previously returned in
TableResult. The ETag is a form of optimistic concurrency control allowing an application to ensure no unexpected modifications have been made to the table.:param etag the tag :type etag: str
- set_read_units(read_units)[source]¶
Sets the read units for the replica table. This defaults to the units set on the existing table.
- Parameters:
read_units (int) – the read units to use, in read units.
- Returns:
self.
- Raises:
IllegalArgumentException – raises the exception if read_units is not a integer.
- set_replica_name(replica_name)[source]¶
Sets the replica name(region) to be added.
- Parameters:
replica_name (str) – the name of the replica.
- Returns:
self.
- Raises:
IllegalArgumentException – raises the exception if replica_name is not a string.
- set_table_name(table_name)[source]¶
Sets the table name to replicate.
- Parameters:
table_name (str) – the name of the table.
- 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.
- set_write_units(write_units)[source]¶
Sets the write units for the replica table. This defaults to the units set on the existing table.
- Parameters:
write_units (int) – the write units to use, in write units.
- Returns:
self.
- Raises:
IllegalArgumentException – raises the exception if write_units is not a integer.