Skip to main content

external_database_connectors

Creates, updates, deletes, gets or lists an external_database_connectors resource.

Overview​

Nameexternal_database_connectors
TypeResource
Idoci.database.external_database_connectors

Fields​

The following fields are returned by SELECT queries:

The ExternalDatabaseConnector object.

NameDatatypeDescription
idstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the [external database connector](#/en/database/latest/datatypes/CreateExternalDatabaseConnectorDetails).
compartmentIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the compartment.
connectionStatusstringThe status of connectivity to the external database.
connectorTypestringThe type of connector used by the external database resource. (MACS) (default: MACS)
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
displayNamestringThe user-friendly name for the [external database connector](#/en/database/latest/datatypes/CreateExternalDatabaseConnectorDetails). The name does not have to be unique.
externalDatabaseIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the external database resource.
freeformTagsobjectFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"}
lifecycleDetailsstringAdditional information about the current lifecycle state.
lifecycleStatestringThe current lifecycle state of the external database connector resource. (PROVISIONING, AVAILABLE, UPDATING, TERMINATING, TERMINATED, FAILED)
systemTagsobjectSystem tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
timeConnectionStatusLastUpdatedstring (date-time)The date and time the connectionStatus of this external connector was last updated.
timeCreatedstring (date-time)The date and time the external connector was created.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexternalDatabaseConnectorId, regionopc-request-idGets information about the specified external database connector.
listselectcompartmentId, externalDatabaseId, regionopc-request-id, limit, page, sortBy, sortOrder, lifecycleState, displayNameGets a list of the external database connectors in the specified compartment.<br />
createinsertregion, displayName, externalDatabaseIdopc-retry-token, opc-request-idCreates a new external database connector.
updateupdateexternalDatabaseConnectorId, regionif-match, opc-request-idUpdates the properties of an external database connector, such as the display name.
deletedeleteexternalDatabaseConnectorId, regionif-match, opc-request-idDeletes an external database connector.<br />Any services enabled using the external database connector must be<br />deleted prior to this operation.<br />

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
compartmentIdstringThe compartment [OCID](/Content/General/Concepts/identifiers.htm).
externalDatabaseConnectorIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the external database connector resource (ExternalDatabaseConnectorId).
externalDatabaseIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the external database whose connectors will be listed.
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)
displayNamestringA filter to return only resources that match the entire display name given. The match is not case sensitive.
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.
lifecycleStatestringA filter to return only resources that match the specified lifecycle state.
limitintegerThe maximum number of items to return per page.
opc-request-idstringUnique identifier for the request.
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).
pagestringThe pagination token to continue listing from.
sortBystringThe field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.
sortOrderstringThe sort order to use, either ascending (ASC) or descending (DESC).

SELECT examples​

Gets information about the specified external database connector.

SELECT
id,
compartmentId,
connectionStatus,
connectorType,
definedTags,
displayName,
externalDatabaseId,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeConnectionStatusLastUpdated,
timeCreated
FROM oci.database.external_database_connectors
WHERE externalDatabaseConnectorId = '{{ externalDatabaseConnectorId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;

INSERT examples​

Creates a new external database connector.

INSERT INTO oci.database.external_database_connectors (
connectorType,
definedTags,
displayName,
externalDatabaseId,
freeformTags,
region,
opc-retry-token,
opc-request-id
)
SELECT
'{{ connectorType }}',
'{{ definedTags }}',
'{{ displayName }}' /* required */,
'{{ externalDatabaseId }}' /* required */,
'{{ freeformTags }}',
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
compartmentId,
connectionStatus,
connectorType,
definedTags,
displayName,
externalDatabaseId,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeConnectionStatusLastUpdated,
timeCreated
;

UPDATE examples​

Updates the properties of an external database connector, such as the display name.

UPDATE oci.database.external_database_connectors
SET
connectorType = '{{ connectorType }}',
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}'
WHERE
externalDatabaseConnectorId = '{{ externalDatabaseConnectorId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
compartmentId,
connectionStatus,
connectorType,
definedTags,
displayName,
externalDatabaseId,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeConnectionStatusLastUpdated,
timeCreated;

DELETE examples​

Deletes an external database connector.<br />Any services enabled using the external database connector must be<br />deleted prior to this operation.<br />

DELETE FROM oci.database.external_database_connectors
WHERE externalDatabaseConnectorId = '{{ externalDatabaseConnectorId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;