Questions tagged [azure-sdk-python]

302 questions
0
votes
2 answers

Creating a pool in Azure with python SDK

I'm trying to create a pool based on standard marketplace ubuntu image. I'm using Azure 4.0.0, image refernce, vm config reference and other things are written based off learn.microsoft.com Here's my code: import azure.batch as batch from…
sr9yar
  • 4,850
  • 5
  • 53
  • 59
0
votes
2 answers

Speeding up blob copying on Azure

I have a use case which often requires to copy a blob (file) from one Azure region to another. The file size spans from 25 to 45GB. Needless to say, this sometimes goes very slowly, with inconsistent performance. This might take up to two hours,…
Aleksandar Stojadinovic
  • 4,851
  • 1
  • 34
  • 56
0
votes
1 answer

How to Perform Bulk Delete in Azure Resource Group using Azure Python SDK

The azure portal has option to delete list of selected resources in a resource group with single button click.. How to perform the same operation using azure python SDK, instead of deleting the vm's one by one.
tamil
  • 381
  • 1
  • 2
  • 9
0
votes
1 answer

Find the app which created a VM using python azure-sdk

How can i find the app, whose credentials were used to launch a vm in azure. I am able to use the compute client to get admin_username attached to a VM but it does not solve my use case as a user can give any username while launching it.…
0
votes
1 answer

Programmatically assign azure resource A a contributor role to Azure resource B

I want to programmatically give an Azure VM a contributor role to another modify things in another resources such as Route tables, Storage…
explorer
  • 737
  • 1
  • 8
  • 23
0
votes
1 answer

azure-sdk-python status code not found GraphRbacManagementClient

I am trying to enumerate Azure AD users from an azure subscription, with this code: WORKING_DIRECTORY = os.getcwd() TENANT_ID = "REDACTED_AZURE_ID_OF_MY_AZURE_AD_USER" AZURE_AUTH_LOCATION = os.path.join(WORKING_DIRECTORY,…
user5647041
0
votes
0 answers

timer triggered azure function not working - dynamic plan

I have below code in azure function which is timer triggered. All it does is creates a logs in azure via service principal method and calls Azure APIs to stand up resources. Functions logs until "logging in". Doesn't go any further and don't log…
0
votes
1 answer

Azure Error: AuthorizationFailed

I am using Azure SDK for python to create resource using python script.After giving the required credentials like CLIENT_ID,TENANT_ID,CLIENT_SECRET,SUBSCRIPTION_ID..It throws a error message like "msrestazure.azure_exceptions.CloudError: Azure…
0
votes
1 answer

How do I get instance id/name from public ip address of VM in azure via python sdk

def get_instance_id_from_pip(self, pip): subscription_id="69ff3a41-a66a-4d31-8c7d-9a1ef44595c3" compute_client = ComputeManagementClient(self.credentials, subscription_id) network_client = NetworkManagementClient(self.credentials,…
explorer
  • 737
  • 1
  • 8
  • 23
0
votes
1 answer

Duplicate existing running Virtual Machine - Python SDK

Does anyone have experience with the Python SDK (v: v2.0.0rc6) and cloning/duplicating running VM's into another resource group? getting the OS disk to start. Will need the data disk as well managed_disk =…
adubbs
  • 3
  • 4
0
votes
1 answer

Issue using Python Azure ServiceBus SDK to send batch of messages with object body

I am trying to pass a list of Messages to Service Bus via the Python SDK and I get a 400 response as JSON is not in required format. I am doing something like this and it fails: messages =…
likeaninja
  • 65
  • 5
0
votes
2 answers

How can I check the disk size of a VM with Azure Python SDK?

When I create a VM with Azure, for example an Standard A6, it comes with 2 mounted units, one with 30GB and another with 285GB. I can see this when I ssh to the VM. From the Azure portal, I can see the 30GB storage, but not the 285GB storage.…
0
votes
1 answer

Automate Python Application in Visual Studio 2017 inside Azure

I am working on extracting Features from csv files and I use Python to perform the task. I am inside Azure and created a Python Application using Visual studio 2017. It works perfectly fine and i am looking for ways to automate the process so that…
AngiSen
  • 915
  • 4
  • 18
  • 41
0
votes
2 answers

Saving virtual machine into an image using azure python sdk

I have been working with Microsoft Azure to build virtual machines using the Azure SDK for Python, and now I want to create a managed image from an existing virtual machine. I saw that there is a way to do it in power shell here But after a long…
Turge
  • 1
0
votes
1 answer

Azure network security group/security rule - address_prefixes and port_ranges

By the definition of Azure python SDK for SecurityRule class: SecurityRule(protocol, source_address_prefix, destination_address_prefix, access, direction, id=None, description=None, source_port_range=None, destination_port_range=None,…
H. Xiao
  • 1
  • 2