1

I don't understand how I can wait until importing an image finish with the aliyun cli. The official documentation describes an "Result polling" mechanism but it works only with existing resources and strings, e.g.

$ aliyun ecs DescribeImages --ImageName="${aliyun_image_name}" --waiter expr='TotalCount' to=1
ERROR: object 0 isn't string

Moreover, I don't understand how I can use the taskId from ImportImage response. There exist documentation.

Here are my steps to reproduce:

$ aliyun ecs ImportImage \
    --RegionId="${aliyun_region}" \
    --DiskDeviceMapping.1.OSSBucket="${aliyun_bucket_name}" \
    --DiskDeviceMapping.1.OSSObject="${aliyun_image_blob}" \
    --ImageName="${aliyun_image_name}"
{
    "ImageId": ...,
    "RegionId": ...,
    "RequestId": ...,
    "TaskId": ...
}
Robert
  • 11
  • 1

1 Answers1

0

$ aliyun ecs DescribeTasks --RegionId "${aliyun_region}" --TaskIds "${TaskId}"