Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spoloj opened this issue Feb 8, 2019 · 1 comment
Closed
Labels
Docs Mgmt This issue is related to a management-plane library.

Comments

@spoloj
Copy link

spoloj commented Feb 8, 2019

@lmazuel lmazuel added Docs Mgmt This issue is related to a management-plane library. labels Feb 8, 2019
@lmazuel
Copy link
Member

lmazuel commented Feb 8, 2019

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 lmazuel closed this as completed Feb 8, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Docs Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

No branches or pull requests

2 participants