Questions tagged [azure-sdk-python]

302 questions
0
votes
1 answer

Best way to do a batch removal of a list of resouce groups

I'm currently automating some clean-up operations in Azure and the structure of my code is basically: A huge for loop that iterates over a list of resource groups that should be deleted. If any of those groups is missing a list of required tags…
David Barranco
  • 442
  • 3
  • 10
0
votes
1 answer

Downloading AzureML model raised SSL error

I have very strange error : If I would like to download one model I get python3.6/site-packages/urllib3/contrib/pyopenssl.py in recv_into(self, *args, **kwargs) 303 try: --> 304 return self.connection.recv_into(*args,…
Marko Zadravec
  • 8,298
  • 10
  • 55
  • 97
0
votes
1 answer

How to get secret values from paged.SecretItemPaged type object

I would like to get the Secret value from given SecretID using Python API's. I have folowing code. On the last line I am trying to get the SECRET_VERSION using get_secret_versions function. The function returns SecretItemPaged type of Object. Can…
Agnihotra
  • 1
  • 1
0
votes
1 answer

How do I set enable_https_traffic_only using Python SDK in Azure?

I am trying to write a Python script to enable "Secure transfer enabled" on an Azure storage account. I'm having some trouble understanding what I need to put in for the following piece of code: storage_account =…
ChrisB
  • 1
0
votes
1 answer

Building Azure-iot-Hub Python-SDk on Windows 10. How to set the path for BOOST and cmake

I am trying to setup the Azure-IoT-Hub SDK for python. For C SDK it is compiling and building fine. But for python I am getting BOOST path error and Cmake error. I am trying to follow this link …
0
votes
2 answers

Get Azure Security Center alerts via python SDK

I want to list azure security center alerts using the python SDK. I found this package: https://pypi.org/project/azure-mgmt-security/ It must be included in the microsoft…
PierreD
  • 13
  • 2
0
votes
2 answers

What is the format of azure monitor metric alert conditions in Azure CLI?

The documentation for az monitor metrics alert create does not explain the format used for --conditon parameter. Seems to me the value ends up being passed as allOf argument to constructor of MetricAlertSingleResourceMultipleMetricCriteria class as…
0
votes
1 answer

ApplicationsOperations object construction

I want to automate application creation in Azure with python. My goal is to execute it with AWS Lambda. I have found ApplicationsOperations class, but I don't understand how to use it. For the client part it's ok with a GraphRbacManagementClient…
arnaud beun
  • 11
  • 1
  • 2
0
votes
2 answers

How to add azure tags array in Python

I'm trying to add an azure tag (array) to a resource. Problem is with an array, or list as tags, Azure SDK for python seems to allow only str. System.Private.CoreLib: Exception while executing function: Functions.azure_tags.…
gab
  • 81
  • 9
0
votes
3 answers

Graph RBAC Credentials returns with error

I am trying to create a new user with the Azure Active Directory libraries for Python, authenticating the user with the UserPassCredentials Class throws a positional argument error. The UserPassCredentials class. All the parameters are defined: …
ghenzi83
  • 109
  • 1
  • 13
0
votes
1 answer

Filter virtual machine name which contains string with Azure Python SDK

I'm looking for a way to filter virtual machine name which contains string "myvm" using Azure Python SDK. I tried the following way but it seems not to work for vm in compute_client.virtual_machines.list_by_location(LOCATION): …
EagleDev
  • 1,754
  • 2
  • 11
  • 31
0
votes
1 answer

AKS Cluster External IP - Azure SDK for Python

I have an aks cluster deployed and assigned with an internal ip, but no external ip: NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.0.0.1 443/TCP …
ghenzi83
  • 109
  • 1
  • 13
0
votes
1 answer

How to filter objects from consumption.usage_details.list()?

I am trying to filter in only those objects which fall under a given date criteria. But I am unable to do so! consumption = ConsumptionManagementClient(credentials, subscription_id, base_url=None) for obj in…
7wick
  • 411
  • 4
  • 17
0
votes
1 answer

Azure Python VM scale set network profile has no network interface configurations

I'm trying to deploy VM Scale Set via the Azure python SDK. When I'm trying to create the scale set an exception is thrown: Message: VM scale set network profile…
liorko
  • 1,435
  • 2
  • 24
  • 41
0
votes
1 answer

Error when creating a pool from a custom image with azure python sdk

I'm trying to create a pool using a custom image I created from VM with azure python sdk. The location and resource group match. Here's my code: import azure.batch as batch from azure.batch import BatchServiceClient from azure.batch.batch_auth…
sr9yar
  • 4,850
  • 5
  • 53
  • 59