Last active
May 19, 2022 08:50
-
-
Save ujnak/b220254d8ba4103137e30906276748dc to your computer and use it in GitHub Desktop.
OCI PL/SQL SDKを使ったオブジェクト・ストレージ上のファイル取得
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
l_response dbms_cloud_oci_obs_object_storage_get_object_response_t; | |
l_status_code number; | |
plsql_sdk_error exception; | |
begin | |
l_response := dbms_cloud_oci_obs_object_storage.get_object( | |
namespace_name => 'ネームスペース' | |
,bucket_name => 'data' | |
,object_name => 'f1-races-2022.json' | |
,region => 'us-ashburn-1' | |
,credential_name => 'MY_DATA_CRED8' | |
); | |
l_status_code := l_response.status_code; | |
if l_status_code != 200 then | |
raise plsql_sdk_error; | |
end if; | |
dbms_output.put_line(to_clob(l_response.response_body)); | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment