Azure AI Fundamentals AI-900 Exam Preparation: Azure AI 900 is an opportunity to demonstrate knowledge of common ML and AI workloads and how to implement them on Azure. This exam is intended for candidates with both technical and non-technical backgrounds. Data science and software engineering experience are not required; however, some general programming knowledge or experience would be beneficial.
Azure AI Fundamentals can be used to prepare for other Azure role-based certifications like Azure Data Scientist Associate or Azure AI Engineer Associate, but it’s not a prerequisite for any of them.
This Azure AI Fundamentals AI-900 Exam Preparation App provides Basics and Advanced Machine Learning Quizzes and Practice Exams on Azure, Azure Machine Learning Job Interviews Questions and Answers, Machine Learning Cheat Sheets.
Download Azure AI 900 on Windows10/11
Azure AI Fundamentals AI-900 Exam Preparation App Features:
– Azure AI-900 Questions and Detailed Answers and References
Elevate Your Career with AI & Machine Learning For Dummies PRO
Ready to accelerate your career in the fast-growing fields of AI and machine learning? Our app offers user-friendly tutorials and interactive exercises designed to boost your skills and make you stand out to employers. Whether you're aiming for a promotion or searching for a better job, AI & Machine Learning For Dummies PRO is your gateway to success. Start mastering the technologies shaping the future—download now and take the next step in your professional journey!
Elevate Your Career with AI & Machine Learning For Dummies PRO
Ready to accelerate your career in the fast-growing fields of AI and machine learning? Our app offers user-friendly tutorials and interactive exercises designed to boost your skills and make you stand out to employers. Whether you're aiming for a promotion or searching for a better job, AI & Machine Learning For Dummies PRO is your gateway to success. Start mastering the technologies shaping the future—download now and take the next step in your professional journey!
Download the AI & Machine Learning For Dummies PRO App:
iOS - Android
Our AI and Machine Learning For Dummies PRO App can help you Ace the following AI and Machine Learning certifications:
- AWS Certified AI Practitioner (AIF-C01): Conquer the AWS Certified AI Practitioner exam with our AI and Machine Learning For Dummies test prep. Master fundamental AI concepts, AWS AI services, and ethical considerations.
- Azure AI Fundamentals: Ace the Azure AI Fundamentals exam with our comprehensive test prep. Learn the basics of AI, Azure AI services, and their applications.
- Google Cloud Professional Machine Learning Engineer: Nail the Google Professional Machine Learning Engineer exam with our expert-designed test prep. Deepen your understanding of ML algorithms, models, and deployment strategies.
- AWS Certified Machine Learning Specialty: Dominate the AWS Certified Machine Learning Specialty exam with our targeted test prep. Master advanced ML techniques, AWS ML services, and practical applications.
- AWS Certified Data Engineer Associate (DEA-C01): Set yourself up for promotion, get a better job or Increase your salary by Acing the AWS DEA-C01 Certification.
Download the AI & Machine Learning For Dummies PRO App:
iOS - Android
Our AI and Machine Learning For Dummies PRO App can help you Ace the following AI and Machine Learning certifications:
- AWS Certified AI Practitioner (AIF-C01): Conquer the AWS Certified AI Practitioner exam with our AI and Machine Learning For Dummies test prep. Master fundamental AI concepts, AWS AI services, and ethical considerations.
- Azure AI Fundamentals: Ace the Azure AI Fundamentals exam with our comprehensive test prep. Learn the basics of AI, Azure AI services, and their applications.
- Google Cloud Professional Machine Learning Engineer: Nail the Google Professional Machine Learning Engineer exam with our expert-designed test prep. Deepen your understanding of ML algorithms, models, and deployment strategies.
- AWS Certified Machine Learning Specialty: Dominate the AWS Certified Machine Learning Specialty exam with our targeted test prep. Master advanced ML techniques, AWS ML services, and practical applications.
- AWS Certified Data Engineer Associate (DEA-C01): Set yourself up for promotion, get a better job or Increase your salary by Acing the AWS DEA-C01 Certification.
Elevate Your Career with AI & Machine Learning For Dummies PRO
Ready to accelerate your career in the fast-growing fields of AI and machine learning? Our app offers user-friendly tutorials and interactive exercises designed to boost your skills and make you stand out to employers. Whether you're aiming for a promotion or searching for a better job, AI & Machine Learning For Dummies PRO is your gateway to success. Start mastering the technologies shaping the future—download now and take the next step in your professional journey!
Download the AI & Machine Learning For Dummies PRO App:
iOS - Android
Our AI and Machine Learning For Dummies PRO App can help you Ace the following AI and Machine Learning certifications:
- AWS Certified AI Practitioner (AIF-C01): Conquer the AWS Certified AI Practitioner exam with our AI and Machine Learning For Dummies test prep. Master fundamental AI concepts, AWS AI services, and ethical considerations.
- Azure AI Fundamentals: Ace the Azure AI Fundamentals exam with our comprehensive test prep. Learn the basics of AI, Azure AI services, and their applications.
- Google Cloud Professional Machine Learning Engineer: Nail the Google Professional Machine Learning Engineer exam with our expert-designed test prep. Deepen your understanding of ML algorithms, models, and deployment strategies.
- AWS Certified Machine Learning Specialty: Dominate the AWS Certified Machine Learning Specialty exam with our targeted test prep. Master advanced ML techniques, AWS ML services, and practical applications.
- AWS Certified Data Engineer Associate (DEA-C01): Set yourself up for promotion, get a better job or Increase your salary by Acing the AWS DEA-C01 Certification.
– Machine Learning Basics Questions and Answers
– Machine Learning Advanced Questions and Answers
– NLP and Computer Vision Questions and Answers
– Scorecard
– Countdown timer
– Machine Learning Cheat Sheets
– Machine Learning Interview Questions and Answers
– Machine Learning Latest News


This Azure AI Fundamentals AI-900 Exam Prep App covers:
- ML implementation and Operations,
- Describe Artificial Intelligence workloads and considerations,
- Describe fundamental principles of machine learning on Azure,
- Describe features of computer vision workloads on Azure,
- Describe features of Natural Language Processing (NLP) workloads on Azure ,
- Describe features of conversational AI workloads on Azure,
- QnA Maker service, Language Understanding service (LUIS), Speech service, Translator Text service, Form Recognizer service, Face service, Custom Vision service, Computer Vision service, facial detection, facial recognition, and facial analysis solutions, optical character recognition solutions, object detection solutions, image classification solutions, azure Machine Learning designer, automated ML UI, conversational AI workloads, anomaly detection workloads, forecasting workloads identify features of anomaly detection work, Kafka, SQl, NoSQL, Python, linear regression, logistic regression, Sampling, dataset, statistical interaction, selection bias, non-Gaussian distribution, bias-variance trade-off, Normal Distribution, correlation and covariance, Point Estimates and Confidence Interval, A/B Testing, p-value, statistical power of sensitivity, over-fitting and under-fitting, regularization, Law of Large Numbers, Confounding Variables, Survivorship Bias, univariate, bivariate and multivariate, Resampling, ROC curve, TF/IDF vectorization, Cluster Sampling, etc.
- This App can help you:
- – Identify features of common AI workloads
- – identify prediction/forecasting workloads
- – identify features of anomaly detection workloads
- – identify computer vision workloads
- – identify natural language processing or knowledge mining workloads
- – identify conversational AI workloads
- – Identify guiding principles for responsible AI
- – describe considerations for fairness in an AI solution
- – describe considerations for reliability and safety in an AI solution
- – describe considerations for privacy and security in an AI solution
- – describe considerations for inclusiveness in an AI solution
- – describe considerations for transparency in an AI solution
- – describe considerations for accountability in an AI solution
- – Identify common types of computer vision solution:
- – Identify Azure tools and services for computer vision tasks
- – identify features and uses for key phrase extraction
- – identify features and uses for entity recognition
- – identify features and uses for sentiment analysis
- – identify features and uses for language modeling
- – identify features and uses for speech recognition and synthesis
- – identify features and uses for translation
- – identify capabilities of the Text Analytics service
- – identify capabilities of the Language Understanding service (LUIS)
- – etc.
Download Azure AI 900 on Windows10/11
Azure AI Fundamentals Breaking News – Azure AI Fundamentals Certifications Testimonials
- What certs, if any, should I go for prior to AZ-500?by /u/Hmb556 (Microsoft Azure Certifications) on March 21, 2025 at 9:38 pm
I'm currently a mid level security engineer with a goal of security architect eventually. Most of these architect positions want knowledge on cloud security, and I know nothing about azure. AZ-500 sounds like the cert to get to learn general azure security, but should I start with AZ-900 or SC-900 first to learn the basic stuff or is that unnecessary? submitted by /u/Hmb556 [link] [comments]
- PowerShell scripts work in RDP but fail in Azure Automationby /u/Lanky_Possibility279 (Microsoft Azure) on March 21, 2025 at 9:10 pm
Deployment Flow: Initialization (runbook): Reads parameters from test pane arguments. Loads configuration from Azure Blob Storage. Authenticates to Azure using DefaultAzureCredential. VM Deployment Loop: Iterates clone_count times to deploy multiple VMs. Finds the next available resource group index. Creates a new resource group. Deploys a VM using the ARM template and specified parameters (VM name, location, size, custom image ID). Waits for VM provisioning. Gets the public IP address of the deployed VM. VM Configuration (trigger_vm_startup_script in runbook): Executes a PowerShell script (AD.ps1) on the VM using compute_client.virtual_machines.begin_run_command. The AD.ps1 script performs the following steps: 1-Setup-Modules.ps1: Installs required PowerShell modules (ImportExcel, SqlServer). 2-Start-FetchService.ps1: Starts the FastAPI service (fetch_releases:app) within a virtual environment and verifies that the service is running. 3-CA.ps1: Reads data from the Excel file, gets the external IP, and tests the API endpoint. 4-UD.ps1: Updates the database with information. 5-CFAPI.ps1: Calls a final API endpoint. Service Verification (check_vm_services in runbook): Checks the status of key services and processes on the VM using a PowerShell script. Result Recording (runbook): Updates the Excel file with the VM's IP address and status (success, service_failed, error). Cleanup (runbook): Saves the updated Excel file back to Blob Storage. Updates and saves the resource group index to Blob Storage. Key Issues: The PowerShell scripts, specifically 2-Start-FetchService.ps1, are failing to connect to the FastAPI service when run through Azure Automation, even though they work when run manually via RDP. Additionally, during the loop (15 attempts), I can access the service from my machine by hitting the endpoint. Verification attempt 15 of 15... Checking http://52.abc.11.123:4534/test Failed to connect to 52.abc.11.123 Checking http://localhost:4534/test Failed to connect to localhost Deployment: C:\Packages\Plugins\Microsoft.CPlat.Core.RunCommandWindows\1.1.18\Downloads\script1.ps1 : AD.ps1 failed: Deployment failed: Service verification failed after 15 attempts + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,script1.ps1 C:\Users\Administrator1\Desktop\version_control\AD.ps1 : Deployment failed: Service verification failed after 15 attempts At C:\Packages\Plugins\Microsoft.CPlat.Core.RunCommandWindows\1.1.18\Downloads\script1.ps1:7 char:13 + .\AD.ps1 + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,AD.ps1 What is possibly the issue, I have already configured Binding configuration, Firewall and NSG rules, Use of Public IP and Localhost submitted by /u/Lanky_Possibility279 [link] [comments]
- general exam insightby /u/alokin123 (Microsoft Azure Certifications) on March 21, 2025 at 8:58 pm
so i attended an online training course as part of the esi program. The instructor said the following about MS exams in general... If you get multiple sections (multiple choice, case study, labs etc...) and say you get 100% in all sections but fail one section, you will fail the exam. Has anybody else heard this? He also suggested that for those questions where you get the same question and it says 'does the solution meet your requirements' its normally that one is a 'Yes' and the other 2 answers are a 'No'. If you just go 'No' to all the question set, you get 50% as opposed to saying 'Yes' twice. submitted by /u/alokin123 [link] [comments]
- Azure Text Content Moderation, is generating lots of false positives, where it's incorrectly flagging gibberish text, or innocuous French language text, as 'Hate' or 'Sexual' (severity level 4+). Is this something that can be calibrated?by /u/What_The_Hex (Microsoft Azure) on March 21, 2025 at 8:43 pm
Example gibberish / innocuous text that was flagged as severity-level 4 for 'hate' or 'sexual': "HENRi MEUNIERS IRAJAH LITH LEGOOSSENS BAUC LILLE PARIS LITH JEGOOSSENS BRU LILLE PARIS HENRI MEUNIER" -- flagged by Azure Content Moderation category 'Hate' severity-level 4. "with Sivous toussez prenez des PASTILLES GERAUDEL IMP. PARIS Si vous toussez prenez des PASTILLES GÉRAUDEL IMP. CHAIX (Aleler Cheret) PARIS (3)" -- flagged by Azure Content Moderation category 'Sexual' severity-level 4. This is quite absurd. Are there any workarounds/solutions for this? submitted by /u/What_The_Hex [link] [comments]
- OpenAI not reflecting in cost management?by /u/Swimming_Leopard_148 (Microsoft Azure) on March 21, 2025 at 8:13 pm
I have a developer subscription account, and today it is giving me an alert at the top saying: “You have USD 45.62 credits remaining. Click here to remove your spending limit.” However Cost Management is showing low spend overall. It happened at the same time I’ve deployed the OpenAi model for the first time. Cost management says I’ve spent $5 on this, however I suspect the actual cost is higher and reflecting in my credit alerts. Any ideas where I can see this? submitted by /u/Swimming_Leopard_148 [link] [comments]
- Azure PIM and approvals flexibilityby /u/Aladdin_LT (Microsoft Azure) on March 21, 2025 at 7:51 pm
Hi, i wonder if it is possible to configure pim to have different approvers for each role assignment, for example for three role assignments I want to have one approver, and for another three - another one. I see that approvers are set at the role settings only, so maybe cli if possible at all? submitted by /u/Aladdin_LT [link] [comments]
- Is sign up currently broken?by /u/Haughwitzer (Microsoft Azure) on March 21, 2025 at 7:26 pm
I am attempting to create a trial account but I keep getting a "the custom error module does not recognize this error" message on different devices and browsers when attempting to sign up. Is anybody else experiencing this? submitted by /u/Haughwitzer [link] [comments]
- Azure operational time (hour) limited accessby /u/Wilsun2007 (Microsoft Azure) on March 21, 2025 at 6:55 pm
Good day, channel. I am wanting to implement an Azure/Entra CA policy that limits a user group to access cloud resources to a certain time window (allow 0700 ET - 2000 PT and deny outside that window). I have not been able to identify how to configure this and wanted to reach out to the channel to see if anyone else has set a time-based (not duration, but access hours) policy. Scenario: objective is to prevent contractual staff from accessing business resources outside of defined hours. Additionally, we have DUO licensing available as well, but I have not identified a method to enforce this by policy there either. Suggestions and advisement greatly welcomed! TIA. submitted by /u/Wilsun2007 [link] [comments]
- admin consent vs user consentby /u/as0909 (Microsoft Azure) on March 21, 2025 at 5:52 pm
we have this application in entra, it was granted admin consent but it doesn’t show anything under user permissions. my understanding is since admin consent was granted, it covers the user consent too that’s why it won’t show anything under user consent. there are some other applications where permissions are showing under user consent, I assume those were added before admin consent was granted. submitted by /u/as0909 [link] [comments]
- Universal Print on iOS and Androidby /u/loky_26 (Microsoft Azure) on March 21, 2025 at 5:40 pm
I can't able to find universal print printer in Android and iOS. Currently we have started POC for universal print, when started we connected the printer to Azure ( Universal print ready) and I can be able to find the printer from intune enrolled windows machine. But the same I can't able to find from Android or iOS Device (MDM enrolled) , any suggestions on how to do it ? Or any config needs to be done? Currently the printer using the Direct print solution, QR printing we configured for next phases submitted by /u/loky_26 [link] [comments]
- Question about a new Windows server and Azure ADby /u/CoolingAndBooted (Microsoft Azure) on March 21, 2025 at 5:39 pm
I have a brand new Windows 2022 server with nothing on it. I need users who will be accessing the shares on it to authenticate with Azure Active Directory. Do I have to first DCPROMO the server and make it an “on prem AD” before using the Azure AD connector? Or is there a way to bypass the “on prem AD” step and just Azure AD connect it? Thanks for any feedback! submitted by /u/CoolingAndBooted [link] [comments]
- Is cheese a fruit : Quick introduction demo to Vision AI (AI-900 level)by /u/kramit (Microsoft Azure Certifications) on March 21, 2025 at 5:11 pm
https://youtu.be/Pr2d8Fw_q9Q submitted by /u/kramit [link] [comments]
- Are you able to output the responses from tool calls used by an agent? (AIProjectClient python sdk)by /u/post_hazanko (Microsoft Azure) on March 21, 2025 at 4:57 pm
Specifically I'm asking about the Grounding tool that uses Bing Search API v7 I'm using this guide here and I've dumped all the steps https://learn.microsoft.com/en-us/azure/ai-services/agents/how-to/tools/bing-grounding?tabs=python&pivots=code-example You will see a call like this: "tool_calls": [ { "id": "call_...", "type": "bing_grounding", "bing_grounding": { "requesturl": "https://api.bing.microsoft.com/v7.0/search?q="agent-query"" } } ] I want to get the query response somehow like the list of urls on page 1. I'm not sure if that's possible. Maybe the agent could return it as a citation. Edit: Ideally I'd just use the bing search itself but apparently it's going to get deprecated/new people can't use it. https://stackoverflow.com/a/79455084 Aside from the stackoverflow link above the problem is an MS support told us "new customers will be unable to add a Bing resource to their subscriptions" about sign-up process for Bing APIs submitted by /u/post_hazanko [link] [comments]
- Looking for volunteer backend developers w/ Azure skillsby /u/tz_earl (Microsoft Azure) on March 21, 2025 at 4:54 pm
I'm the project coordinator for a team at Helpful Engineering, an all volunteer-staffed nonprofit that was founded at the beginning of the Covid pandemic. Our team is grappling with the problem of dynamically creating supply chains for physical products. We are anticipating the need to do this in future pandemics and other catastrophes when supply chains will be disrupted again. We're currently building initial software to implement a conceptual framework for defining products and matching makers of those products with people who have need of them. Products could include face masks, tourniquets, etc. We're recruiting for volunteer backend developers, with Azure skills as one of the requirements. The developer role we're looking to fill is briefly described here: https://airtable.com/appckajUfV4F3NGTw/shrwgNtBUAzuciV0j/tbl5Bqnjl3JRKD7qP/viwbsxjF3X89sHnC6/recqt8VVBTFxTcR4R submitted by /u/tz_earl [link] [comments]
- CIS Benchmark - Azure Foundationby /u/atcscm (Microsoft Azure) on March 21, 2025 at 4:39 pm
Hi Guys, I’ve just enabled the CIS Benchmark - Azure Foundation initiative and linked it to the Root Management Group, but I’m not seeing any results populated under Regulatory Compliance in Defender for Cloud. Do you know how this works or where I should be looking to see the assessment results? thanks submitted by /u/atcscm [link] [comments]
- Cloud Security Summaries GitHub Repo - SC-200by /u/0xFuture (Microsoft Azure) on March 21, 2025 at 3:47 pm
So, I probably spent way too much time on preparing for this certification.. Initially started with the SC-200 MS learn content. Went through the path, scheduled the exam, and failed. It prodded me to spent some more time on preparing. Colleagues suggested I "take a shortcut" but I did not want to take this route because I'm actually trying to make the transition into cloud security. Thus actually knowing and understanding the material was my goal. Either way, because I didn't like the MS learn vs Study guide objectives, which SC-200 seems to do very poorly compared to other MS exams, I used the technical documentation as a way to answer the study guide objectives. Result: https://github.com/404Future/cloud-security-summaries/tree/main/Azure/SC-200 I ended up making a good (extensive) reference sheet. Hope this can prove useful to others too. submitted by /u/0xFuture [link] [comments]
- Cloud Security Summaries GitHub Repo - SC-200by /u/0xFuture (Microsoft Azure Certifications) on March 21, 2025 at 3:46 pm
So, I probably spent way too much time on preparing for this certification.. Initially started with the SC-200 MS learn content. Went through the path, scheduled the exam, and failed. It prodded me to spent some more time on preparing. Colleagues suggested I "take a shortcut" but I did not want to take this route because I'm actually trying to make the transition into cloud security. Thus actually knowing and understanding the material was my goal. Either way, because I didn't like the MS learn vs Study guide objectives, which SC-200 seems to do very poorly compared to other MS exams, I used the technical documentation as a way to answer the study guide objectives. Result: https://github.com/404Future/cloud-security-summaries/tree/main/Azure/SC-200 I ended up making a good (extensive) reference sheet. Hope this can prove useful to others too. submitted by /u/0xFuture [link] [comments]
- 21st March 2025 Azure Updateby /u/JohnSavill (Microsoft Azure) on March 21, 2025 at 3:08 pm
This week's Azure update is up. https://youtu.be/aQg0N2ds0kI Linkedin Article version - https://www.linkedin.com/pulse/21st-march-2025-update-john-savill-rvcnc/ 00:00 - Introduction 00:11 - New videos 00:49 - AKS retirements (WASI and GPU preview) 01:20 - AKS Kubenet retirement 02:15 - Azure Spring Apps retirement 02:49 - GPU VM hibernation 04:12 - ACA NVIDIA NIM and serverless GPU 05:18 - ND GB200 v6 06:28 - App Service Node 20 LTS retire 06:43 - Managed monitor for Arc-enabled K8S 07:47 - BYOIP for secured virtual hub 08:25 - ANF SAP HANA AVG enhancements 09:17 - ANF AVG for Oracle 09:33 - Stream Analytics Event Hub schema registry integration 10:47 - Chaos Studio new role 11:49 - API Center developer portal 12:41 - New OpenAI audio models 14:17 - Close submitted by /u/JohnSavill [link] [comments]
- Data Encryption at Rest - MySQL Flexible Serverby /u/Tom_the_Tank_Train (Microsoft Azure) on March 21, 2025 at 2:46 pm
How do I confirm that my data is encrypted at rest? The documentation says it is encrypted by default with AES-256. However, when I login with workbench all of the data is unencrypted. How is this possible? Don't I need a decryption key to see the data? What is going on here?? submitted by /u/Tom_the_Tank_Train [link] [comments]
- Azure API - too many requests issue.by /u/Smooth-Home2767 (Microsoft Azure) on March 21, 2025 at 1:49 pm
I am trying to fetch the cost & the sub for which it is in a certain limit , like under 5 $, May you guys please take a look, how can i optimize this. I have already fetched the sub ID in a different txt file & importing those here in this script. Taken help from co pliot as well import requests import pandas as pd import time import random import ssl from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry from datetime import datetime # Azure Credentials TENANT_ID = "x" CLIENT_ID = "x" CLIENT_SECRET = "x" # File containing subscription IDs SUBSCRIPTIONS_FILE = "subscriptions.txt" # Exclude specific subscriptions EXCLUDED_NAMES = ["visual studio", "suscripción de visual studio", "mpn", "pay-as-you-go"] # Azure Endpoints TOKEN_URL = f"https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token" # Force TLS 1.2+ to prevent SSL errors ssl_context = ssl.create_default_context() ssl_context.set_ciphers('DEFAULT:@SECLEVEL=1') # Configure Requests session with retries session = requests.Session() retries = Retry( total=3, backoff_factor=5, # Increase delay between retries status_forcelist=[429, 500, 502, 503, 504] # Retry on rate limits and server errors ) session.mount("https://", HTTPAdapter(max_retries=retries)) # Get Access Token def get_access_token(): data = { "grant_type": "client_credentials", "client_id": CLIENT_ID, "client_secret": CLIENT_SECRET, "scope": "https://management.azure.com/.default" } response = session.post(TOKEN_URL, data=data) response.raise_for_status() return response.json()["access_token"] # Read subscription IDs from file def read_subscription_ids(): with open(SUBSCRIPTIONS_FILE, "r") as file: return [line.strip() for line in file.readlines() if line.strip()] # Get cost details for multiple subscriptions in a batch def get_costs_for_subscriptions(subscription_ids, token): results = [] failed_subscriptions = [] BATCH_SIZE = 5 # Batch size to avoid Azure rate limits for i in range(0, len(subscription_ids), BATCH_SIZE): batch = subscription_ids[i:i + BATCH_SIZE] for sub_id in batch: COST_URL = f"https://management.azure.com/subscriptions/{sub_id}/providers/Microsoft.CostManagement/query?api-version=2023-03-01" headers = {"Authorization": f"Bearer {token}"} cost_query = { "type": "ActualCost", "timeframe": "Custom", "timePeriod": { "from": "2025-02-01T00:00:00Z", "to": "2025-02-28T23:59:59Z" }, "dataset": { "granularity": "None", "aggregation": { "totalCost": { "name": "PreTaxCost", "function": "Sum" } } } } for attempt in range(3): # Retry max 3 times try: response = session.post(COST_URL, headers=headers, json=cost_query) if response.status_code == 429: wait = 5 ** attempt + random.uniform(1, 3) # Exponential backoff print(f"🔁 429 Too Many Requests for {sub_id}. Retrying in {wait:.2f}s...") time.sleep(wait) continue # Retry request elif response.status_code == 400: print(f"❌ 400 Bad Request for {sub_id}. Skipping...") failed_subscriptions.append({"Subscription ID": sub_id, "Error": "400 Bad Request"}) break # Stop retrying on 400 errors response.raise_for_status() data = response.json() rows = data.get("properties", {}).get("rows", []) if rows: cost = rows[0][0] if cost < 5: print(f"✅ {sub_id} has low spend: ${cost}") results.append({"Subscription ID": sub_id, "Monthly Spend ($)": cost}) break # Exit retry loop if successful except requests.exceptions.SSLError as e: print(f"⚠️ SSL Error on {sub_id}: {e}. Retrying in 5s...") time.sleep(5) except requests.exceptions.RequestException as e: print(f"❌ Failed to fetch cost for {sub_id}: {e}") failed_subscriptions.append({"Subscription ID": sub_id, "Error": str(e)}) break # Stop retrying time.sleep(2) # Slower request rate to prevent rate limiting return results, failed_subscriptions # Main execution if __name__ == "__main__": print("🔄 Fetching Azure costs for February (subscriptions under $5)...") token = get_access_token() subscriptions = read_subscription_ids() results, failed_subscriptions = get_costs_for_subscriptions(subscriptions, token) # Export results to Excel if results: df = pd.DataFrame(results) filename = f"low_cost_subscriptions_{datetime.now().strftime('%Y%m%d_%H%M%S')}.xlsx" df.to_excel(filename, index=False) print(f"\n✅ Exported low-cost subscriptions to: {filename}") if failed_subscriptions: df_fail = pd.DataFrame(failed_subscriptions) fail_filename = f"failed_subscriptions_{datetime.now().strftime('%Y%m%d_%H%M%S')}.xlsx" df_fail.to_excel(fail_filename, index=False) print(f"\n⚠️ Exported failed subscriptions to: {fail_filename}") submitted by /u/Smooth-Home2767 [link] [comments]
Download Azure AI 900 on Windows10/11
A Twitter List by enoumen