python-3.x - 使用 python SDK 的 Azure 共享图像库 "GalleriesOperations"

标签 python-3.x azure azure-devops devops azure-sdk-python

我正在尝试创建共享图像库并使用 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 Overflowazure-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/

相关文章:

python - 函数装饰器中的名称重整

python - 从 Python2 到 Python3 时的 b64encode

UriTemplate 中使用的 Azure API 管理模板参数必须在操作中定义,反之亦然

azure-devops - 当且仅当分支等于 yaml 中的 master 时,Azure 管道才会运行特定任务

检测到组成员身份更改时的 Azure Active Directory 通知

python - 如何使用一个 Firefox 实例 Selenium WebDriver 和 Python 运行多个测试?

python - Pandas - 如果观察到另一列(B 列)中的条件,则使用另一列(A 列)的值创建一列(C 列)

azure - 如何在azure devops中将测试计划从一个团队项目复制到另一个团队项目?

c# - 无法解决(到目前为止)的序列化错误

Visual Studio Team Services for ASP.net Core 应用程序的 Azure 应用服务部署失败