Use Resource Principal with DBMS_CLOUD

When you specify a resource principal credentials in DBMS_CLOUD calls, the database authenticates the Oracle Cloud Infrastructure requests for you and the database provides the credentials to access to the resources.

If you have not already done so, perform the required prerequisite steps:

To use a DBMS_CLOUD procedure with resource principal credentials:

  1. Use a DBMS_CLOUD procedure or function and specify OCI$RESOURCE_PRINCIPAL as the credential name.

    For example, you can access the Oracle Cloud Infrastructure Object Storage using resource principal credentials:

       (channel_id CHAR(1),
        channel_desc VARCHAR2(20),
        channel_class VARCHAR2(20)
        table_name =>'CHANNELS',
        credential_name =>'OCI$RESOURCE_PRINCIPAL',
        file_uri_list =>'',
        format => json_object('delimiter' value ',')

If you compare the steps required to access Object Storage as shown in Create Credentials and Copy Data into an Existing Table, notice that Step 1, creating credentials is not required when you use resource principal because you are using the system defined OCI$RESOURCE_PRINCIPAL credentials.