我正在尝试在 Oracle 云上的存储桶中打印文件。我已经为它安装了 oci 库并走到了这一步。现在我不知道如何获取特定存储桶中的文件列表。
import os,oci
from oci.config import validate_config
tenancyId="sdkfh" # Your tenancies OCID.
authUserId="sdjfs"; # The OCID of the user ID being used.
OCI_KEY_PATH="filename"; # Path of the key file.
keyFingerprint="12:13:14:15"; # The fingerprint of the key file being used
config = {
"user": authUserId,
"key_file": OCI_KEY_PATH,
"fingerprint": keyFingerprint,
"tenancy": tenancyId,
"region": "us-phoenix-1"
}
validate_config(config)
identity = oci.identity.IdentityClient(config)
user = identity.get_user(config["user"]).data
print(user)