Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- enable resource principal
- EXEC DBMS_CLOUD_ADMIN.ENABLE_RESOURCE_PRINCIPAL();
- -- list all credentials, you should see OCI$RESOURCE_PRINCIPAL
- SELECT * FROM all_credentials
- -- test accessing object storage with different types of credentials: User Auth Token, User API Key and Resource Principal
- SELECT * FROM dbms_cloud.list_objects('CRED_USER_AUTH_TOKEN','https://objectstorage.<region-id>.oraclecloud.com/n/<ns>/b/bucket-20230405-1558/o/');
- SELECT * FROM dbms_cloud.list_objects('CRED_USER_API_KEY','https://objectstorage.<region-id>.oraclecloud.com/n/<ns>/b/bucket-20230405-1558/o/');
- SELECT * FROM dbms_cloud.list_objects('OCI$RESOURCE_PRINCIPAL','https://objectstorage.<region-id>.oraclecloud.com/n/<ns>/b/bucket-20230405-1558/o/');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement