external_database_connectors
Creates, updates, deletes, gets or lists an external_database_connectors resource.
Overview​
| Name | external_database_connectors |
| Type | Resource |
| Id | oci.database.external_database_connectors |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The ExternalDatabaseConnector object.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the [external database connector](#/en/database/latest/datatypes/CreateExternalDatabaseConnectorDetails). |
compartmentId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment. |
connectionStatus | string | The status of connectivity to the external database. |
connectorType | string | The type of connector used by the external database resource. (MACS) (default: MACS) |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
displayName | string | The user-friendly name for the [external database connector](#/en/database/latest/datatypes/CreateExternalDatabaseConnectorDetails). The name does not have to be unique. |
externalDatabaseId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the external database resource. |
freeformTags | object | Free-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"} |
lifecycleDetails | string | Additional information about the current lifecycle state. |
lifecycleState | string | The current lifecycle state of the external database connector resource. (PROVISIONING, AVAILABLE, UPDATING, TERMINATING, TERMINATED, FAILED) |
systemTags | object | System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
timeConnectionStatusLastUpdated | string (date-time) | The date and time the connectionStatus of this external connector was last updated. |
timeCreated | string (date-time) | The date and time the external connector was created. |
An Oracle Cloud Infrastructure resource used to connect to an external Oracle Database.<br />This resource stores the database connection string, user credentials, and related details that allow you to<br />manage your external database using the Oracle Cloud Infrastructure Console and API interfaces.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the [external database connector](#/en/database/latest/datatypes/CreateExternalDatabaseConnectorDetails). |
compartmentId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment. |
connectionStatus | string | The status of connectivity to the external database. |
connectorType | string | The type of connector used by the external database resource. (MACS) (default: MACS) |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
displayName | string | The user-friendly name for the [external database connector](#/en/database/latest/datatypes/CreateExternalDatabaseConnectorDetails). The name does not have to be unique. |
externalDatabaseId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the external database resource. |
freeformTags | object | Free-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"} |
lifecycleDetails | string | Additional information about the current lifecycle state. |
lifecycleState | string | The current lifecycle state of the external database connector resource. (x-obmcs-enumref: #/definitions/ExternalDatabaseConnector/lifecycleState) |
systemTags | object | System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
timeConnectionStatusLastUpdated | string (date-time) | The date and time the connectionStatus of this external connector was last updated. |
timeCreated | string (date-time) | The date and time the external connector was created. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | externalDatabaseConnectorId, region | opc-request-id | Gets information about the specified external database connector. |
list | select | compartmentId, externalDatabaseId, region | opc-request-id, limit, page, sortBy, sortOrder, lifecycleState, displayName | Gets a list of the external database connectors in the specified compartment.<br /> |
create | insert | region, displayName, externalDatabaseId | opc-retry-token, opc-request-id | Creates a new external database connector. |
update | update | externalDatabaseConnectorId, region | if-match, opc-request-id | Updates the properties of an external database connector, such as the display name. |
delete | delete | externalDatabaseConnectorId, region | if-match, opc-request-id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The compartment [OCID](/Content/General/Concepts/identifiers.htm). |
externalDatabaseConnectorId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the external database connector resource (ExternalDatabaseConnectorId). |
externalDatabaseId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the external database whose connectors will be listed. |
region | string | OCI 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) |
displayName | string | A filter to return only resources that match the entire display name given. The match is not case sensitive. |
if-match | string | 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. |
lifecycleState | string | A filter to return only resources that match the specified lifecycle state. |
limit | integer | The maximum number of items to return per page. |
opc-request-id | string | Unique identifier for the request. |
opc-retry-token | string | 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 may be rejected). |
page | string | The pagination token to continue listing from. |
sortBy | string | The 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. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). |
SELECT examples​
- get
- list
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 }}'
;
Gets a list of the external database connectors in the specified compartment.<br />
SELECT
id,
compartmentId,
connectionStatus,
connectorType,
definedTags,
displayName,
externalDatabaseId,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeConnectionStatusLastUpdated,
timeCreated
FROM oci.database.external_database_connectors
WHERE compartmentId = '{{ compartmentId }}' -- required
AND externalDatabaseId = '{{ externalDatabaseId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND lifecycleState = '{{ lifecycleState }}'
AND displayName = '{{ displayName }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: external_database_connectors
props:
- name: region
value: "{{ region }}"
description: Required parameter for the external_database_connectors resource.
- name: connectorType
value: "{{ connectorType }}"
description: |
The type of connector used by the external database resource.
valid_values: ['MACS']
default: MACS
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined tags for this resource. Each key is predefined and scoped to a namespace.
For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
- name: displayName
value: "{{ displayName }}"
description: |
The user-friendly name for the
[external database connector](#/en/database/latest/datatypes/CreateExternalDatabaseConnectorDetails).
The name does not have to be unique.
- name: externalDatabaseId
value: "{{ externalDatabaseId }}"
description: |
The [OCID](/Content/General/Concepts/identifiers.htm) of the external database resource.
- name: freeformTags
value: "{{ freeformTags }}"
description: |
Free-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"}`
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: 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 may be rejected).
description: 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 may be rejected).
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique identifier for the request.
description: Unique identifier for the request.
UPDATE examples​
- update
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​
- delete
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 }}'
;