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,但该 HTTP、HTTPS 或 QUIC 监听尚未创建成功,系统后台的创建任务仍在进行。您可以调用 GetListenerAttribute 查询 HTTP、HTTPS 或 QUIC 监听的创建状态:

  • 当 HTTP、HTTPS 或 QUIC 监听处于 Provisioning 状态时,表示 HTTP、HTTPS 或 QUIC 监听正在创建中。
  • 当 HTTP、HTTPS 或 QUIC 监听处于 Running 状态时,表示 HTTP、HTTPS 或 QUIC 监听创建成功。

流控信息

请求速率为200/60(s)。更多流控信息,请前往配额中心查看

授权信息

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

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
alb:CreateListener
Create
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/{#securitypolicyId}
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
alb:ListenerProtocol

请求参数

字段名称字段详情
LoadBalancerIdstring

应用型负载均衡实例 ID。

示例值:alb-n5qw04uq8vavfe****参考取值来源:
    ListLoadBalancers
    CreateLoadBalancer
ClientTokenstring

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

示例值:123e4567-e89b-12d3-a456-426655440000
DryRunboolean

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

示例值:false
ListenerProtocolstring

监听协议。展开详情

示例值:HTTP参考取值来源:
    ListListeners
    GetListenerAttribute
ListenerPortinteger<int32>

负载均衡实例前端使用的端口。展开详情

示例值:80
ListenerDescriptionstring

自定义监听名称。展开详情

示例值:HTTP_80
RequestTimeoutinteger<int32>

指定请求超时时间。单位:秒。展开详情

示例值:60取值 >= 1
IdleTimeoutinteger<int32>

指定连接空闲超时时间。单位:秒。展开详情

示例值:3取值 >= 1
GzipEnabledboolean

是否开启Gzip压缩,对特定文件类型进行压缩。取值:展开详情

示例值:true
Http2Enabledboolean

是否开启HTTP/2特性。取值:展开详情

示例值:true
SecurityPolicyIdstring

安全策略 ID。支持系统安全策略和自定义安全策略。展开详情

示例值:tls_cipher_policy_1_0参考取值来源:
    CreateSecurityPolicy
    ListSecurityPolicies
CaEnabledboolean

是否开启双向认证。取值:展开详情

示例值:false
XForwardedForConfigobject

XForward 字段配置信息。

QuicConfigobject

配置关联的 QUIC 监听。

Certificatesarray<object>

证书列表信息。

子级条数 <= 1子级条数 >= 1
CaCertificatesarray<object>

监听配置的 CA 证书列表。目前仅支持添加 1 个 CA 证书。

子级条数 <= 1子级条数 >= 1
DefaultActionsarray<object>

规则动作列表。

Tagarray<object>

标签。

返回参数

字段名称字段详情
JobIdstring

异步任务 ID。

示例值:72dcd26b-f12d-4c27-b3af-18f6aed5****
ListenerIdstring

监听 ID。

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

请求 ID。

示例值:CEF72CEB-54B6-4AE8-B225-F876*******

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
ResourceAlreadyExist.Listener
The specified resource %s is already exist.诊断
400
IncorrectStatus.LoadBalancer
The status of %s [%s] is incorrect.诊断
400
IncorrectBusinessStatus.LoadBalancer
The business status of %s [%s]  is incorrect.诊断
400
ResourceQuotaExceeded.LoadBalancerListenersNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
OperationDenied.CrossLoadBalancerQUICListener
The operation is not allowed because of %s.诊断
400
ResourceAlreadyAssociated.Listener
The specified resource %s is already associated.诊断
400
ResourceQuotaExceeded.SecurityPolicyAttachedNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
ResourceQuotaExceeded.ServerGroupAttachedNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
ResourceQuotaExceeded.LoadBalancerServersNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
ResourceQuotaExceeded.ServerAddedNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
Mismatch.VpcId
The %s is mismatched for %s and %s.诊断
400
OperationDenied.ServerGroupProtocolNotSupport
The operation is not allowed because of ServerGroupProtocolNotSupport.诊断
400
OperationDenied.GRPCServerGroup
The operation is not allowed because of %s.诊断
400
Mismatch.LoadBalancerEditionAndConnectionDrain
The %s and %s are mismatched.诊断
400
Mismatch.LoadBalancerEditionAndSlowStartEnable
The %s and %s are mismatched.诊断
400
InvalidParameter
Invalid parameter, please check the parameter input.诊断
403
Forbidden.SecurityPolicy
Authentication has failed for SecurityPolicy.诊断
403
Forbidden.LoadBalancer
Authentication is failed for %s.诊断
403
Forbidden.Listener
Authentication is failed for %s.诊断
404
ResourceNotFound.LoadBalancer
The specified resource %s is not found.诊断
404
ResourceNotFound.ServerGroup
The specified resource %s is not found.诊断
404
ResourceNotFound.SecurityPolicy
The specified resource %s is not found.诊断
404
ResourceNotFound.Listener
The specified resource %s is not found.诊断
404
ResourceNotFound.Certificate
The specified resource %s is not found.诊断

变更历史

变更时间变更内容概要操作
2024-12-20
变更请求参数XForwardedForConfig
2024-09-03
变更请求参数Certificates
2024-01-29
变更错误码400
变更错误码403
2024-01-29
变更错误码403
2024-01-17
变更错误码400
新增错误码403
2023-11-06
变更请求参数CaCertificates
2020-09-29
变更请求参数RequestTimeout
  • 1
  • 2
  • 10 条/页

相关示例

创建一个http协议的Alb监听并启动它
2021-09-24
2024年08月20日