[doc] example how to instanciate the classe `ProvidersOperations(client, config, serializer, deserializer)`
See original GitHub issueHello,
I need to get all the providers of a subscription, in order to get the available apiVersions
of each resource, because I’m writing some scripts that need to work with different Azure resources, that needs different apiVersions, for example: resource_client.resources.get_by_id()
.
From azcli, it’s as simple as az provider list
It seems that the same thing from Python SDK is to use the list
method of the class ProvidersOperations
:
https://learn.microsoft.com/en-us/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2021_04_01.operations.providersoperations?view=azure-python
But I cannot figure out how to set the parameters of this class: ProvidersOperations(client, config, serializer, deserializer)
, could you please provide some concret examples ? The online doc is a little bit too concise for me:
Parameters
`client`
Required
Client for service requests.
`config`
Required
Configuration of service client.
`serializer`
Required
An object model serializer.
`deserializer`
Required
An object model deserializer.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Hi @copdips please refer to https://github.com/Azure-Samples/azure-samples-python-management/blob/main/samples/resources/manage_providers.py
Hi @copdips, since you haven’t asked that we “
/unresolve
” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve
” to reopen the issue.