我正在尝试创建共享图像库并使用 python SDK 中的“GalleriesOperations”向其中添加现有图像,但不确定要为“序列化器”和“反序列化器”以及“配置”参数传递什么参数
GalleriesOperations(client, config, serializer, deserializer)
我需要一些引用代码示例,因为我是 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']
这是我正在尝试的,但是对于compute_client var,它没有显示任何“compute_client.config”作为参数传递。
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")
最佳答案
谢谢User Laurent Mazuel - Stack Overflow 。将您的建议作为答案发布以帮助其他社区成员。
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)
引用文献:python - How to create Azure Mgmt serializer/deserializer parameters? - Stack Overflow和 azure-sdk-for-python/_galleries_operations.py at main · Azure/azure-sdk-for-python · GitHub
关于python-3.x - 使用 python SDK 的 Azure 共享图像库 "GalleriesOperations",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71262558/