Questions tagged [azure-sdk-python]
302 questions
4
votes
5 answers
Python Azure sdk: How to retrieve secrets from keyvault?
I need to retrieve secrets from keyvault. This is my code so far:
from azure.mgmt.keyvault import KeyVaultManagementClient
from azure.common.credentials import ServicePrincipalCredentials
subscription_id = 'x'
# See above for details on creating…

90abyss
- 7,037
- 19
- 63
- 94
4
votes
3 answers
Show azure cost analysis data using Azure billing API/SDK
In Azure portal ,if one subscription is selected ,the cost analysis can be viewed like the following screenshot
I want to programmatically fetch the information the like the one displayed above may be using using some python SDK API/REST API.
If…

Soumen
- 121
- 1
- 3
- 14
4
votes
1 answer
AttributeError: 'BlockBlobService' object has no attribute 'create_block_blob_from_path'
Accocrding this manual I shoud use thise pice of code:
from azure.storage.blob import ContentSettings
block_blob_service.create_block_blob_from_path(
'mycontainer',
'myblockblob',
'sunset.png',
…

kAldown
- 610
- 2
- 8
- 27
3
votes
1 answer
Cosmos SQL db create item
I have an issue with cosmos SQL db python sdk and I have no idea how to fix it.
I have a data explorer with some data in. And I am using python sdk to query this data and save the output in a json file. So far everything works just fine. But I…

Nayden Van
- 1,133
- 1
- 23
- 70
3
votes
1 answer
Azure-ML Deployment does NOT see AzureML Environment (wrong version number)
I've followed the documentation pretty well as outlined here.
I've setup my azure machine learning environment the following way:
from azureml.core import Workspace
# Connect to the workspace
ws = Workspace.from_config()
from azureml.core import…

Brian Goodwin
- 391
- 3
- 14
3
votes
0 answers
How to find backup policy details attached to a VM in Azure using Azure python SDK?
How can I fetch the VM backup policy details for VM running in Azure cloud using Azure python SDK?
Also, Is there any way we can fetch VM start/stop schedule?
In Azure portal, I can see backup policy detail inside VM operations section.

Himanshu Mundeepi
- 129
- 2
- 10
3
votes
1 answer
Deploying node to AKS cluster using azure-sdk-for-python
I have so far been unable to find any azure library for creating a node within an AKS cluster. I can use the azure cli, but my goal is to use python.
I can create the resource and resource groups using the azure python SDK - …

ghenzi83
- 109
- 1
- 13
3
votes
1 answer
Gathering information about vm's in a resource group
Would someone be able to share or point to some sample code which basically extracts the information in the following link (https://learn.microsoft.com/en-us/rest/api/compute/virtualmachinesizes/list) from each vm in a resource group? Thanks!

crypticgamer
- 101
- 7
3
votes
3 answers
How to get list of users who are having owner access for a azure subscription using python
I am trying to get the list of users who are having owner access for a subscription.
I tried checking for python azure sdk. But am not getting any api which does this functionality.
Subscription list api is available but it is not providing details…

Marshall Kiruba
- 43
- 1
- 6
3
votes
0 answers
Private Python package repository for Azure Notebooks?
What is the current best practice for maintaining repository of proprietary Python packages in Azure such as for use in Azure Notebooks or for building Python-based web apps?
I am hoping for MS to pick this one up to see if they have something in…

Victor Olex
- 1,458
- 1
- 13
- 28
3
votes
3 answers
Get virtual machine created time on Azure using Python API
My requirement is to get all VMs in a subscription with launch(created) time. I didn't find the VM created time in the dashboard where as in the Activity log found a timestamp. I would like to fetch all VMs which were created by one subscription id…

user6136315
- 695
- 4
- 13
- 37
2
votes
1 answer
Navigating Azure Python SDK
I'm unable to understand how the documentation is organized. The part I am most confused about is models method in each class, for example: Model class for resource management class
What are these models?
There are multiple documentation pages for a…

tattersail2207
- 23
- 3
2
votes
1 answer
Azure KeyVault: how to retrieve clientId, clientSecret and the tenantId for an existing Service Principal?
The cloud engineer in my organization has set up an Azure KeyVault and a Service Principal. I know the id of this Service Principal, but I also need clientId, clientSecret, and tenantId.
The documentation shows that these variables are exposed to…

Zizzipupp
- 1,301
- 1
- 11
- 27
2
votes
1 answer
How to upload large file (~100mb) to Azure blob storage using Python SDK?
I am using the latest Azure Storage SDK (azure-storage-blob-12.7.1). It works fine for smaller files but throwing exceptions for larger files > 30MB.
azure.core.exceptions.ServiceResponseError: ('Connection aborted.',
timeout('The write operation…

DevMonk
- 427
- 1
- 9
- 23
2
votes
2 answers
'HTTP headers is not in the correct format' error when creating Azure Container using Python SDK
I'm trying to create an Azure blob container using Python SDK with the below code. I'm getting an 'ErrorCode:InvalidHeaderValue' in the response.
I'm using the 'ConnectionString' from 'Access Keys' section from the Azure Portal of the storage…

anoj-cha
- 211
- 5
- 19