I want to create an Azure virtual machine with the VM extension(Custom script extension) using the python SDK. Basically, I want a python program that will create the VM with VM extension using the Azure SDK management libraries, I am able to use the Azure SDK management libraries in a Python script to create a resource group that contains a
Tag: azure
Generate SAS token with expiry for Azure IoT Hub in Python
I have an IoT Hub with various devices set up with SAS authentication. From the docs, I understand how to connect to a device with the IoT Hub connection string however I wish to know how to utilise an SAS token. I have found this function in the docs but I am struggling to understand how to use this token.
Azure function deployment failed: “Malformed SCM_RUN_FROM_PACKAGE when uploading built content”
I have two Azure accounts. And I tried to deploy the same function to these two accounts (to the function apps). The deployment to the 1st account – successful, but to the 2nd account – failed. The only big difference between the two accounts is that I do not have direct access to the resource group that the 2nd account’s
Multi-processing in Azure Databricks
I have been tasked lately, to ingest JSON responses onto Databricks Delta-lake. I have to hit the REST API endpoint URL 6500 times with different parameters and pull the responses. I have tried two modules, ThreadPool and Pool from the multiprocessing library, to make each execution a little quicker. ThreadPool: How to choose the number of threads for ThreadPool, when
Django Azure SQL ProgrammingError Invalid Object name
I am trying to use Azure SQL with Django by using mssql-django. I get this error during “makemigrations”: django.db.utils.ProgrammingError: (’42S02′, “[42S02] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid object name ‘customer_group_customergroup’. (208) (SQLExecDirectW); [42S02] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Statement(s) could not be prepared. (8180)”) The connection to Azure SQL is already working. If I start a new app,
Access data within the blob storage without downloading
Our customer is using Azure’s blob storage service to save big files so that we can work with them using an Azure online service. We want to read and work with these files with a computing resource obtained by Azure directly without downloading them into another Azure service, like Azure Machine Learning Studio. Until now, we are unable to access
Azure DevOps Python {“count”:1,”value”:{“Message”:”Unexpected character encountered while parsing value: q. Path ”, line 0, position 0.rn”}}
Trying to get Work Items for an Azure DevOps Project. Gives response 400 Have tried many things, been struggling a bit with this. Any help is much appreciated. How to get project’s work items without using their ID . Does the request need to be changed in some way? Answer Update your post to (json=payload): or use something like this:
How create/delete secrets of Azure service principal by using another service principal with REST API or Python SDK?
I have 2 app registration (2 service principals). First of them I use as my credentials to have token. I need from my Python script to create and delete the secrets of the second service principal. Unfortunately, I did not find such an example in the documentation. How can I do that? Answer You can use the below code for
REST API: How to prevent “An existing connection was forcibly closed by the remote host”
Following this thread, https://stackoverflow.com/a/2582070/6534818, I am wondering if there is any room for improvement to my REST API query that would limit the frequency to which I receive the following error: “An existing connection was forcibly closed by the remote host”. The thread suggests, as one possibility, that the query is malformed. My general setup for a query to Azure
Azure Batch NodePreparationError trying to fetch Docker image from Azure Container Registry
I’m trying to run an Azure Batch task on an Ubuntu VM with an image pulled from a private Azure Container Registry. The nodes in the pool fail on creation with the following error, whether I pre-fetch or not: Baseline: I have an Azure Subscription with a Resource Group. In the Resource Group is a Container Registry, a Batch Account,