aliyun-cli icon indicating copy to clipboard operation
aliyun-cli copied to clipboard

pager not work

Open terryfth opened this issue 3 years ago • 3 comments

  • Execution Command: aliyun vpc DescribeVSwitches -o cols=VSwitchId rows=VSwitches.VSwitch[] --pager

  • Output: VSwitchId ======= vsw-<record 1> vsw-<record 2> vsw-<record 3> vsw-<record 4> vsw-<record 5> vsw-<record 6> vsw-<record 7> vsw-<record 8> vsw-<record 9> vsw-<record 10>

--pager doesn't work, I have over 10+ vswitch, --pager not get them out, but --PageSize 50 does

terryfth avatar Oct 10 '22 14:10 terryfth

Yeah, same like ecs DescribeImages, and --PageSize can not larger than 100.

$ aliyun ecs DescribeImages --PageSize 101
ERROR: SDK.ServerError
ErrorCode: InvalidParameter
Recommend: https://next.api.aliyun.com/troubleshoot?q=InvalidParameter&product=Ecs
RequestId:
Message: The specified parameter "PageSize" is not valid.
RespHeaders: map[Access-Control-Allow-Origin:[*] Connection:[keep-alive] Content-Length:[278] Content-Type:[application/json;charset=utf-8] Date:[Mon, 10 Oct 2022 14:35:46 GMT] X-Acs-Request-Id:[] X-Acs-Trace-Id:[]]

But --PageSize 100 works well, maybe you can add this to documents

generals-space avatar Oct 10 '22 14:10 generals-space

--pager is the issue. expect the command merge the pages into single output as it stated: #aliyun help | grep pager use --pager to merge pages for pageable APIs

terryfth avatar Oct 10 '22 15:10 terryfth

--pager 3.0.82 still works. since 3.0.83, it fails

terryfth avatar Oct 10 '22 15:10 terryfth