Aliyun CLI - Pull images from enterprise ECR
We are trying to use Aliyun with the Alicloud Container Registry Enterprise edition and it is actually working but the Aliyun CLI is not updated with the latest API options, so in there NEither the --InstanceId, nor the --force nor the --version nor the --endpoint is listed on the
GetAuthorizationToken help command, and we should not force a skip of "api and parameters check" or force the api version as this sounds like something that could cause issues`
cli only stores information about specific versions of APIs, so it is not possible to check parameters for parameters of other versions. The --force, --version, --endpoint options have nothing to do with the interface, and belong to the global behavior options of cli. Under a specific interface, the help command only displays the parameters of the interface, you can directly run aliyun to get the option of cli behavior.
Fair enough, so the parameters are documented, we just didn't see them. But why do we have to use the --force flag in order to get credentials for the Alicloud Container Registry Enterprise Edition?
If the interface or parameter you call is not recorded in cli, cli will return an error. At this time, you must use --force to skip the check of cli. As you described, the parameters of the Enterprise Edition are not recorded in the cli, so you need to use the --force option.
Hm this sounds like a design error for me. And the error message you get for this is very unclear.
Regarding to the --version, how would I know what API version should I use? I was not able to see it in the CLI documentation.
You can use aliyun <product> help to check the version.
For example:
$ aliyun ecs help
Alibaba Cloud Command Line Interface Version 3.0.45
Usage:
aliyun Ecs <ApiName> --parameter1 value1 --parameter2 value2 ...
Product: Ecs (Elastic Compute Service)
Version: 2014-05-26
Link: https://help.aliyun.com/api/ecs
# Omit other output
Please add support like aliyun cr-ee xxx without --force, thanks.
I just re-tested this and it works now without --force --endpoint=xxx --version=xxx.
@rogerioefonseca you can close this issue now.