Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALB: AssociateAclsWithListener/DissociateAclsFromListener InvalidAclIds error #420

Open
lxwzy opened this issue Apr 11, 2022 · 1 comment

Comments

@lxwzy
Copy link

lxwzy commented Apr 11, 2022

I want to request ALB's AssociateAclsWithListener & DissociateAclsFromListener with aliyun-cli.

However, there are some problems with AclIds parameter. Request only successful with --AclIds.1 'acl-***' --force.

  • Command Format:
aliyun version
3.0.116
  • Execution Command:
# use --AclIds '["acl-***"]'
aliyun alb DissociateAclsFromListener --endpoint alb.cn-hangzhou.aliyuncs.com --region cn-hangzhou --AclType White --ListenerId 'lsn-***' --AclIds '["acl-***"]'

# use --AclIds 'acl-***'
aliyun alb DissociateAclsFromListener --endpoint alb.cn-hangzhou.aliyuncs.com --region cn-hangzhou --AclType White --ListenerId 'lsn-***' --AclIds '["acl-***"]' --force

# use --AclIds.1 'acl-***'
aliyun alb AssociateAclsWithListener --endpoint alb.cn-hangzhou.aliyuncs.com --region cn-hangzhou --AclType White --ListenerId 'lsn-***' --AclIds.1 'acl-***'

# use --AclIds.1 'acl-***' with --force
aliyun alb AssociateAclsWithListener --endpoint alb.cn-hangzhou.aliyuncs.com --region cn-hangzhou --AclType White --ListenerId 'lsn-***' --AclIds.1 'acl-***' --force
  • Output:
# use --AclIds '["acl-***"]'
ERROR: SDK.ServerError
ErrorCode: InvalidAclIds; Illegal parameter serialization format. Flat format is required.
Recommend: https://troubleshoot.api.aliyun.com?q=InvalidAclIds; Illegal parameter serialization format. Flat format is required.&product=Alb
RequestId: ***
Message: Specified parameter AclIds; Illegal parameter serialization format. Flat format is required. is not valid.
RespHeaders: map[Access-Control-Allow-Headers:[X-Requested-With, X-Sequence, _aop_secret, _aop_signature, x-acs-action, x-acs-version, x-acs-date, Content-Type] Access-Control-Allow-Methods:[POST, GET, OPTIONS, PUT, DELETE] Access-Control-Allow-Origin:[*] Access-Control-Max-Age:[172800] Connection:[keep-alive] Content-Length:[444] Content-Type:[application/json;charset=utf-8] Date:[Mon, 11 Apr 2022 07:25:21 GMT] X-Acs-Request-Id:[***] X-Acs-Trace-Id:[***]]

# use --AclIds 'acl-***'
ERROR: SDK.ServerError
ErrorCode: InvalidAclIds; Illegal parameter serialization format. Flat format is required.
Recommend: https://troubleshoot.api.aliyun.com?q=InvalidAclIds; Illegal parameter serialization format. Flat format is required.&product=Alb
RequestId: ***
Message: Specified parameter AclIds; Illegal parameter serialization format. Flat format is required. is not valid.
RespHeaders: map[Access-Control-Allow-Headers:[X-Requested-With, X-Sequence, _aop_secret, _aop_signature, x-acs-action, x-acs-version, x-acs-date, Content-Type] Access-Control-Allow-Methods:[POST, GET, OPTIONS, PUT, DELETE] Access-Control-Allow-Origin:[*] Access-Control-Max-Age:[172800] Connection:[keep-alive] Content-Length:[444] Content-Type:[application/json;charset=utf-8] Date:[Mon, 11 Apr 2022 07:25:21 GMT] X-Acs-Request-Id:[***] X-Acs-Trace-Id:[***]]

# use --AclIds.1 'acl-***'
ERROR: '--AclIds.1' is not a valid parameter or flag. See `aliyun help alb AssociateAclsWithListener`.

Did you mean:
  AclIds

# use --AclIds.1 'acl-***' with --force
{
	"JobId": "***",
	"RequestId": "***"
}
@JacksonTian
Copy link
Contributor

暂时只能以 --AclIds.1 'acl-***' --force 的形式来使用这种数组型参数。CLI 需要升级一个较大的版本才能解决该问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants