Azure Resources libraries for python
Deploy, monitor, and manage resources in groups with Azure Resource Manager.
Use the management API to create resource groups and deploy resources from templates.
Bash
pip install azure-mgmt-resource
pip install azure-identity
Create a new resource group in the Azure Eastern US region.
Python
from azure.identity import DefaultAzureCredential
from azure.mgmt.resource import ResourceManagementClient
import os
LOCATION = 'eastus'
GROUP_NAME ='sample_resource_group'
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = ResourceManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
client.resource_groups.create_or_update(GROUP_NAME, {'location': LOCATION})
Manage Azure resources and resource groups
View the complete list of Azure Resource Manager samples.
Samarbejd med os på GitHub
Kilden til dette indhold kan findes på GitHub, hvor du også kan oprette og gennemse problemer og pullanmodninger. Du kan få flere oplysninger i vores vejledning til bidragydere.
Azure SDK for Python feedback
Azure SDK for Python er et åben kildekode projekt. Vælg et link for at give feedback: