Skip to main content

console_connections

Creates, updates, deletes, gets or lists a console_connections resource.

Overview​

Nameconsole_connections
TypeResource
Idoci.database.console_connections

Fields​

The following fields are returned by SELECT queries:

The console connection information was retrieved.

NameDatatypeDescription
idstringThe OCID of the console connection.
compartmentIdstringThe OCID of the compartment to contain the console connection.
connectionStringstringThe SSH connection string for the console connection.
dbNodeIdstringThe OCID of the database node.
fingerprintstringThe SSH public key fingerprint for the console connection.
lifecycleStatestringThe current state of the console connection. (ACTIVE, CREATING, DELETED, DELETING, FAILED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdbNodeId, consoleConnectionId, regionGets the specified database node console connection's information.
listselectdbNodeId, regionLists the console connections for the specified database node.<br />
createinsertdbNodeId, region, publicKeyopc-retry-tokenCreates a new console connection to the specified database node.<br />After the console connection has been created and is available,<br />you connect to the console using SSH.<br />
deletedeletedbNodeId, consoleConnectionId, regionif-matchDeletes the specified database node console connection.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
consoleConnectionIdstringThe OCID of the console connection.
dbNodeIdstringThe database node [OCID](/Content/General/Concepts/identifiers.htm).
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
if-matchstringFor 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-retry-tokenstringA 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 may be rejected).

SELECT examples​

Gets the specified database node console connection's information.

SELECT
id,
compartmentId,
connectionString,
dbNodeId,
fingerprint,
lifecycleState
FROM oci.database.console_connections
WHERE dbNodeId = '{{ dbNodeId }}' -- required
AND consoleConnectionId = '{{ consoleConnectionId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Creates a new console connection to the specified database node.<br />After the console connection has been created and is available,<br />you connect to the console using SSH.<br />

INSERT INTO oci.database.console_connections (
publicKey,
dbNodeId,
region,
opc-retry-token
)
SELECT
'{{ publicKey }}' /* required */,
'{{ dbNodeId }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
connectionString,
dbNodeId,
fingerprint,
lifecycleState
;

DELETE examples​

Deletes the specified database node console connection.

DELETE FROM oci.database.console_connections
WHERE dbNodeId = '{{ dbNodeId }}' --required
AND consoleConnectionId = '{{ consoleConnectionId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;