티스토리 뷰

Python

Oracle Cloud oci로 인증 방법

j0n9m1n1 2019. 10. 23. 16:49
반응형

글 수정 중

 

pip install oci

 

oci reference

https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/quickstart.html

 

Quickstart — oci 2.6.1 documentation

CRUD operations and Pagination Creating entities Let's create a new user and group, and add the user to the group. Then we'll list all users in the tenancy, and finally clean up the user and group we created. First, we'll need to create a valid config obje

oracle-cloud-infrastructure-python-sdk.readthedocs.io

 

config에 인증 정보가 필요 함, 그 인증 정보들 어디서 어떻게 얻는지 아래 링크에 나와 있음

rsa key, fingerprint, region, ids 등등

https://docs.cloud.oracle.com/iaas/Content/API/Concepts/sdkconfig.htm

 

SDK and CLI Configuration File

SDK and CLI Configuration File Oracle Cloud Infrastructure SDKs and CLI require basic configuration information, like user credentials and tenancy OCID. You can provide this information by: Using a configuration file Declaring a configuration at runtime Th

docs.cloud.oracle.com

 

from oci.identity import IdentityClient
# config = from_file(file_location = )
#https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigningkey.htm
#key, 등등
config = config = {
    "user": 'ocid1.user.blahblahblah',
    "key_file": 'I:/oci_keys/oci_key.pem',
    "fingerprint": 'ee:45:~~~~~~~~~~~~~',
    "pass_phrase": 'password',
    "tenancy": 'ocid1.tenancy.blahblahblah',
    "region": 'ap-seoul-1'
}
identity = IdentityClient(config)
댓글

티스토리 방명록

최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday