将访问控制关联到监听。
接口说明
AssociateAclsWithListener 接口属于异步接口,即系统返回一个请求 ID,但该 ACL 尚未成功绑定监听器,系统后台的绑定任务仍在进行。您可以调用 ListAclRelations 查询 ACL 的绑定状态:
当 ACL 处于 Associating 状态时,表示 ACL 正在绑定监听器中。
当 ACL 处于 Associated 状态时,表示 ACL 已成功绑定监听器。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
alb:AssociateAclsWithListener |
create |
*Acl
*LoadBalancer
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| AclIds |
array |
是 |
ACL 实例 ID,最多支持 3 个 ACL 实例 ID。 |
|
|
string |
否 |
ACL 实例 ID。 |
acl-hp34s2h0xx1ht4nwo**** |
|
| ListenerId |
string |
是 |
监听实例 ID |
lsn-bp1bpn0kn9******* |
| AclType |
string |
是 |
访问控制类型:
|
White |
| DryRun |
boolean |
否 |
是否只预检此次请求,取值:
|
true |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
5A2CFF0E-5718-45B5-9D4D-70B****** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
将访问控制关联到监听。 |
||
| JobId |
string |
异步任务 ID |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
| RequestId |
string |
请求 ID |
CEF72CEB-54B6-4AE8-B225-F87****** |
示例
正常返回示例
JSON格式
{
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****",
"RequestId": "CEF72CEB-54B6-4AE8-B225-F87******"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | QuotaExceeded.AclsNum | The quota of %s is exceeded, usage %s/%s. | 配额%s已超额度限制,目前已使用%s,配额为%s。 |
| 400 | IncorrectStatus.Acl | The status of %s [%s] is incorrect. | 访问控制策略组ACL的当前状态不支持本次操作。 |
| 400 | ResourceQuotaExceeded.ListenerAclEntriesNum | The quota of %s is exceeded for resource %s, usage %s/%s. | 配额%s已超额度限制,资源是%s,目前已使用%s,配额为%s。 |
| 400 | OperationDenied.AclNotSupport | The operation is not allowed because of %s. | 因为%s,该操作不被允许。 |
| 400 | ResourceAlreadyExist.AclEntry | The specified resource %s already exists. | 访问控制策略组中的IP条目已存在。 |
| 400 | ResourceInUse.Acl | The specified resource %s is in use. | 资源%s正在使用中。 |
| 400 | OperationDenied.LoadBalancerJoinedSecurityGroupNotSupportAcl | The operation is not allowed because of loadbalancer joined security group not support acl. | 不允许操作,原因是负载均衡实例加入安全组后,不能再绑定访问控制策略 |
| 404 | ResourceNotFound.Acl | The specified resource %s is not found. | 访问控制策略组ACL不存在。 |
| 404 | ResourceNotFound.Listener | The specified resource %s is not found. | 监听不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。