Questions tagged [oci-python-sdk]
The Oracle Cloud Infrastructure Python SDK is a python package that provides an interface to the Oracle Cloud Infrastructure (OCI). Use this tag for questions related to using the Python SDK.
28
questions
-1
votes
0
answers
20
views
get events python sdk oci
I am using the Oracle Cloud SDK for Python, I have a script which returns the page events but it returns about 107 lines in JSON format. How can I manipulate this response just so that it brings me ...
0
votes
0
answers
46
views
Check instance metrics
is there any way to check if instance got any metrics using OCI Python SDK?
Will be list_metrics from oci.monitoring.MonitoringClient good method to check if there is some metrics collected for ...
0
votes
0
answers
54
views
Structured search returns only a limited set of attributes
A couple of questions about OCI structured search, using the Python SDK.
# Create a search client
search_client=oci.resource_search.ResourceSearchClient(config)
# Create a structured search query
...
0
votes
0
answers
214
views
Unable to use the OCI Python SDK os_management_client, with a cross tenancy access instance principal setup
Not able to use the OCI Python SDK os_management_client, with a cross tenancy access instance principal setup. I have setup the instance principal, with all the required policies, in both the source ...
0
votes
0
answers
164
views
Creating cross region autonomous database failing with 'message': "The following tag namespaces / keys are not authorized or not found: 'oracle-tags'"
Need help in creating cross region standby database via python have tried creating with
oci.database.models.CreateCrossRegionAutonomousDatabaseDataGuardDetails
I am unable to find an example for the ...
1
vote
1
answer
130
views
I am trying to add the Tag (freefrom_tag) for particular compute instances in OCI using python script and facing TypeError
Please find the error
update_volume_response = core_client.update_instance(instance_id=i.id, update_instance_details = oci.core.models.UpdateInstanceDetails(freeform_tags))
TypeError: ...
0
votes
1
answer
107
views
Latest OCI SDK documantation page API reference does not list all service clients
Latest 2.88.1 (updated 11/15) documentation site under API reference, it does not list all service clients for navigation and search.
oci sdk 2.88.0 lists dozens of service clients.
oci sdk 2.88.1 ...
1
vote
1
answer
1k
views
No such file or directory: '/opt/ml/input/data/test/revenue_train.csv' Sagemaker [SM_CHANNEL_TRAIN]
I am trying to deploy my RandomForestClassifier on Amazon Sagemaker using Python SDK. I have been following this example https://github.com/aws/amazon-sagemaker-examples/blob/main/sagemaker-script-...
4
votes
1
answer
3k
views
Get list of all compartments in OCI Tenancy
I am trying to get the list of all compartments (including child compartments) in OCI Tenancy using Python SDK.
But the below OCI API does not give the root compartment details.
Is there a way to get ...
1
vote
1
answer
338
views
OCI response returns a list object with one entry
The response.data attribute seems to return a Python list type object, with just one entry. To get the response data into a Python dict object I have to strip out the list contents before using the ...
0
votes
1
answer
141
views
Python sdk OCI : Remove backup policy of boot volume
How do we remove the assigned backup policy of boot volume attached to an instance using python sdk OCI package
Didn't find with UpdateBootVolume
https://docs.oracle.com/en-us/iaas/api/#/en/iaas/...
0
votes
1
answer
208
views
Python oci sdk question regarding boot volume backup
How do we find boot volume backups of the particular instance using python oci package
list_boot_volume_backups function will return all the backups in the compartment.
ref: https://docs.oracle.com/en-...
0
votes
1
answer
600
views
Can't import ModelConfigurationDetails in the OCI notebooksession using conda env
I am using OCI notebook session for model deployment. cloned oci-python-sdk in the env.
env: Python [conda env:generalmachinelearningforgpusv1]
(/home/datascience/conda/generalmachinelearningforgpusv1)...
0
votes
1
answer
391
views
Creating compute instance from instance configuration
I want to create a compute instance using oci-python-sdk in the same way as I would by clicking 'launch instance' in the "compute >> instance configurations >> instance configuration ...
0
votes
1
answer
365
views
reading response returns error python sdk OCI
I am trying to read and pass the response of work requests in OCI for my compartment.
import oci
import configparser
import json
from oci.work_requests import WorkRequestClient
DEFAULT_CONFIG = "...
0
votes
1
answer
157
views
Is it possible to store user credentials on generated Oracle wallet?
The OCI Phyton SDK has functions, like GenerateAutonomousDatabaseWalletDetails and generate_autonomous_database_wallet, to generate the database wallet.
Is there any function that allows adding user ...
-1
votes
1
answer
1k
views
Upload files to object storage using python SDK
I am using Python SDK for OCI. I tried the Upload manager example and its working perfectly fine when i try to upload files from file system. But i have to expose this python code as REST service (...
0
votes
1
answer
2k
views
how to get a Pre-Authenticated request for an object in OCI object storage using python SDK?
I want to create pre-authenticated request for an object inside a bucket in the OCI object storage using python SDK. I found out that I can use get_preauthenticated_request for the bucket to put ...
0
votes
3
answers
2k
views
How to get all ip attached to compute using python oci
I want to use python oci package to get information about environment.
how to list all IPs addresses (both public or private) attached to compute node?
list_instances() does not provide this part ...
0
votes
1
answer
700
views
IdentityClient.get_user() returns tenancy OCID in compartment_id field
I have a piece of Python code like this:
oci_config = oci.config.from_file("config_file","profile_name")
identity = oci.identity.IdentityClient(oci_config)
user = identity....
0
votes
2
answers
649
views
How can I retrieve Idp Group Users using, oci python SDK?
When I call list_users method for IdentityClient, It enlists the users (Including IDP users.) I have created the IDP Group Mapping in OCI Console. Now I want something where I can identify every ...
0
votes
2
answers
388
views
Downloaded GZ files is showing 0 byte
I am using OCI Python SDK and when i am trying to download an object (from an OCI bucket) which is GZ format it is getting downloaded but the file size is zero byte. Attaching the code
Any help is ...
1
vote
2
answers
3k
views
python oci: Oracle Cloud Infrastructure: How to list files in a bucket
I am trying to print the files in a bucket on Oracle cloud. I have installed oci library for it and came this far. Now I dont know further how to get list of files in a particular bucket.
import os,...
1
vote
1
answer
207
views
Is the 'key_content' field safe to use in the OCI Python SDK?
This primarily directed at the Oracle SDK Dev team but docs say to post non-issue questions here.
When passing a config to the OCI SDK, the code accepts a value in the 'key_content' field that can ...
0
votes
2
answers
369
views
Retrieve the credentials.zip file from GenerateAutonomousDataWarehouseWalletDetails
We are trying to download the wallet credentials.zip file for Autonomous Datawarehouse via Python SDK.
We have an option called --file when we do the same operation using oci cli.
oci db autonomous-...
0
votes
1
answer
282
views
Getting an AttributeError when I try to create a Oracle BMC SecurityList
I am trying to automate the creation of resources in Oracle BMC. I have this python code:
import oraclebmc
config = oraclebmc.config.from_file()
network = oraclebmc.core.virtual_network_client....
0
votes
1
answer
143
views
Integrate oracle-bmcs-python-sdk in setup.py
I am installing dependencies of my package through setup.py file. If the package is not present in PyPI like oracle-bmcs-python-sdk , then how I can integrate it in my setup.py file. Currently we have ...
0
votes
1
answer
201
views
Bare Metal Cloud - Python SDK SSL/TLS exception
When trying to use the BMCS Python SDK, I get an SSL/TLS exception. Why?
Exception:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>