'Azure shared image gallery using python SDK "GalleriesOperations"
I am trying to create shared image gallery and add existing image to it using "GalleriesOperations" in python SDK, but not sure of what argument to pass for "serializer" and "deserializer" and "config" parameter for
GalleriesOperations(client, config, serializer, deserializer)
I need some reference code example as I am new to azure.
GalleriesOperations(client, config, serializer, deserializer)
begin_create_or_update(resource_group_name: str, gallery_name: str, gallery: "_models.Gallery", **kwargs: Any) -> LROPoller['_models.Gallery']
Here is what i was trying , but for compute_client var, its not showing any "compute_client.config" to pass as an argument.
compute_client = azure.mgmt.compute.ComputeManagementClient(credential, subscription_id)
resource_group_name="xxxx",gallery_name='xxxxx', gallery='_models.Gallery', location='xxxx', tags=None, description=None, identifier="xxxx")
Solution 1:[1]
Thank you User Laurent Mazuel - Stack Overflow. Posting your suggestion as an answer to help other community members.
You don’t need to create Serializer, Deserializer and config manually, instead create client to pass required arguments.
client.blobs_containers.get(rg_name, account_name, container_name)
References: python - How to create Azure Mgmt serializer/deserializer parameters? - Stack Overflow and azure-sdk-for-python/_galleries_operations.py at main · Azure/azure-sdk-for-python · GitHub
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MadhurajVadde-MT |
