【发布时间】:2021-07-12 21:58:59
【问题描述】:
我正在尝试使用 python SDK 创建一个容器组。 创建资源:
resources = models.ResourceRequests(memory_in_gb=2.0,cpu=1.0)
然后得到这个错误:
HttpResponseError: (InvalidRequestContent) The request content was invalid and could not be deserialized: 'Could not find member 'memoryInGB' on object of type 'ResourceRequirements'. Path 'properties.containers[0].properties.resources.memoryInGB', line 1, position 174.'.
Code: InvalidRequestContent
Message: The request content was invalid and could not be deserialized: 'Could not find member 'memoryInGB' on object of type 'ResourceRequirements'. Path 'properties.containers[0].properties.resources.memoryInGB', line 1, position 174.'.
该方法是否在寻找 memoryInGB 但变量是 memory_in_gb?
尝试设置resources.memoryInGB = 2,但这不起作用。
【问题讨论】: