CreateListener_网关型负载均衡_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

CreateListener 接口属于异步接口,即系统返回一个请求 ID,但该监听尚未创建成功,系统后台的创建任务仍在进行。您可以调用 GetListenerAttribute 查询监听的创建状态:

  • 当监听处于 Provisioning 状态时,表示监听正在创建中。

  • 当监听处于 Running 状态时,表示 监听创建成功。

流控信息

请求速率为200/60(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
gwlb:CreateListener
Create
LoadBalancer
acs:gwlb:{#regionId}:{#accountId}:loadbalancer/{#LoadbalancerId}
ServerGroup
acs:gwlb:{#regionId}:{#accountId}:servergroup/{#ServerGroupId}
Listener
acs:gwlb:{#regionId}:{#accountId}:listener/*

请求参数

字段名称字段详情
LoadBalancerIdstring

网关型负载均衡实例的 ID。

示例值:gwlb-te609d6696632f7*****参考取值来源:
    ListLoadBalancers
    CreateLoadBalancer
ListenerDescriptionstring

自定义监听描述。展开详情

示例值:listener-description
ServerGroupIdstring

服务器组 ID。

示例值:sgp-ckh01px70dszof****参考取值来源:
    ListServerGroups
    CreateServerGroup
    AddServersToServerGroup
DryRunboolean

是否只预检此次请求。取值:展开详情

示例值:false
ClientTokenstring

客户端 Token,用于保证请求的幂等性。展开详情

示例值:123e4567-e89b-12d3-a456-42665544****
Tagarray<object>

标签列表。一次调用最多支持添加 20 个标签。

子级条数 <= 20

返回参数

字段名称字段详情
ListenerIdstring

监听 ID。

示例值:lsn-wi3c0v30ivysrg****
RequestIdstring

请求 ID。

示例值:A045E652-D298-5E70-A978-7247135336FB

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
IncorrectBusinessStatus.LoadBalancer
The business status of %s [%s] is incorrect.诊断
400
MissingParam.TagKey
The param of TagKey is missing.诊断
400
MissingParam.TagValue
The param of TagValue is missing.诊断
400
OperationDenied.TooManyListeners
The operation is not allowed because of TooManyListener.诊断
400
IncorrectStatus.LoadBalancer
The status of %s [%s] is incorrect.诊断
400
ResourceInUse.IP
The specified resource of IP is in use.诊断
400
Mismatch.VpcId
The %s is mismatched for %s and %s.诊断
400
IncorrectStatus.ServerGroup
The status of %s [%s] is incorrect.诊断
400
DuplicatedParam.TagKey
The param of %s is duplicated.诊断
400
IllegalParam.TagKey
The param of %s is illegal.诊断
400
IllegalParam.TagValue
The param of %s is illegal.诊断
404
ResourceNotFound.LoadBalancer
The specified resource of %s is not found.诊断
404
ResourceNotFound.ServerGroup
The specified resource of %s is not found.诊断

变更历史

暂无变更历史

相关示例