azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

Is there any way to pass subscription id as an argument to these python APIs:

Open spoloj opened this issue 7 years ago • 1 comments

spoloj avatar Feb 08 '19 02:02 spoloj

Hi @spoloj In all the operations, the subscription_id is a parameter of the main client:

from azure.mgmt.resource import ResourceManagementClient

LOCATION = 'eastus'
GROUP_NAME ='sample_resource_group'

resource_client = ResourceManagementClient(credentials, subscription_id)
resource_client.resource_groups.create_or_update(GROUP_NAME, {'location': LOCATION})

If you have a set of subscription_id, you then will need to create several clients.

Thanks,

lmazuel avatar Feb 08 '19 20:02 lmazuel