Comments (8)
@adizohar Could you please help me on this issue.
from oci-python-sdk.
Please run the below in order to compare
It could be you have additional filter on the console
import oci
# Load configuration from the default OCI config file
config = oci.config.from_file()
# Initialize the OptimizerClient
optimizer_client = oci.optimizer.OptimizerClient(config)
# Get the compartment ID from the config file
compartment_id = config['tenancy']
compartment_id_in_subtree = True
# List recommendations
list_recommendations_response = oci.pagination.list_call_get_all_results(
optimizer_client.list_recommendations,
compartment_id=compartment_id,
compartment_id_in_subtree=compartment_id_in_subtree
)
# Iterate over each recommendation
for recommendation in list_recommendations_response.data:
# Print recommendation details (optional)
if recommendation.name != "cost-management-compute-enable-monitoring-name":
continue
# List resource actions for the recommendation
list_resource_actions_response = oci.pagination.list_call_get_all_results(
optimizer_client.list_resource_actions,
recommendation_id=recommendation.id,
compartment_id=compartment_id,
compartment_id_in_subtree=compartment_id_in_subtree,
sort_by='TIMECREATED',
)
# Iterate over each resource action
for resource_action in list_resource_actions_response.data:
rext = resource_action.extended_metadata
print(rext['resourceOwningTenancyName'] + " - " + rext['region'] + " - " + resource_action.resource_id)
from oci-python-sdk.
@adizohar After running this code also am still getting extra resources cost-management-compute-enable-monitoring-name. My OCI console only has 7 but API fetches 8 records.
API response:
- -ap-hyderabad-1 - ocid1.instance.oc1.ap-hyderabad-1.anuhsljr7zexxxxxxxxxxxxxqb4ksdfjx7czo4icya
- -ap-hyderabad-1 - ocid1.instance.oc1.ap-hyderabad-1.anuhsljrypiaxxxxxxxxxxxxxxe3f2rcckyeixmse5ua2ba
-
- ap-mumbai-1 - ocid1.instance.oc1.ap-mumbai-1.anrg6ljr7qgdflycobmxxxxxxxxxxxxxxh333qmu7vpn7vq
-
- ap-hyderabad-1 - ocid1.instance.oc1.ap-hyderabad-1.anuhsljr7qxxxxxxxxxxxxxgdflshrv7npzi4d6li7pq
-
- ap-mumbai-1 - ocid1.instance.oc1.ap-mumbai-1.anrg6ljr7qgdflycxxxxxxxxxxxxxxxxx4q4wzi37tunv2bcggq
-
- ap-mumbai-1 - ocid1.instance.oc1.ap-mumbai-1.anrg6ljr7qgdflyxxxxxxxxxxxxxxcumym35nzurcysq
-
- ap-mumbai-1 - ocid1.instance.oc1.ap-mumbai-1.anrg6ljr7qgdflyxxxxxxxxxxxau477rdye2hfi6pasrq
-
- ap-mumbai-1 - ocid1.instance.oc1.ap-mumbai-1.anrg6ljr7qgdflycxxxxxxxxxxytvqxlul7rwd6btzxja
from oci-python-sdk.
Gopi
I don’t see any issue with OCI SDK
This issue should go to Oracle support
Please open Oracle support ticket and the support will investigate and will redirect it to the console team.
Because it is not OCI SDK issue please kindly close this issue
Thank you
from oci-python-sdk.
@adizohar I have one question :
- is there any time span between the cloud console and API?
from oci-python-sdk.
No, The console uses the same APIs
from oci-python-sdk.
Thank you adizohar
from oci-python-sdk.
Thankyou for your support @adizohar
from oci-python-sdk.
Related Issues (20)
- Report with properties of PDBs HOT 4
- Error using FlowLogCaptureFilterRuleDetails
- Missing dependency on sseclient
- oci python SDK while using instance-principals, raising exceptions.ServiceError NotAuthorizedOrNotFound HOT 7
- a little typo in the documentation how to run CLI with help option $ python3 oci_capacity_reporter_gui.py -help HOT 1
- Error in log-analytics storage purge-storage-data HOT 4
- Focus report how we can get it. HOT 1
- call mysql_client_composite_ops.copy_backup_and_wait_for_state display AttributeError: 'DbBackupsClient' object has no attribute 'get_work_request'
- usageapi not working for ap-mumbai region HOT 8
- update python cryptography dependency again (42 -> 43)
- muscat region instance not reachable with the api_config parameters from python script. HOT 7
- Date for adding `response_format` from cohere api HOT 2
- ShowSubscription - 401 - Not Authorized HOT 14
- implementation of price calculator in application HOT 1
- Upgrade to use python package cryptography 43 HOT 5
- while runnig the usgae api call getting error HOT 3
- Conflicting messages when SDK fails to find «~/.oci/config». HOT 1
- Unexpected password prompt if pass_phrase is incorrect HOT 2
- Upgrade cryptography Version to >=43.0.1 Due to High Severity Security Vulnerability
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oci-python-sdk.