CreateLoadBalancerHTTPSListener_负载均衡_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.

接口说明

注意事项

新建的监听的状态为 stopped。创建完成后,调用 StartLoadBalancerListener 接口启动监听来转发流量。

前提条件

您已经创建传统型负载均衡,具体操作,请参见 CreateLoadBalancer

流控信息

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

授权信息

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

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
slb:CreateLoadBalancerHTTPSListener
Create
acl
acs:slb:{#regionId}:{#accountId}:acl/{#aclId}
certificate
acs:slb:{#regionId}:{#accountId}:certificate/{#certificateId}
loadbalancer
acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
slb:tag
slb:tag
slb:tag

请求参数

字段名称字段详情
RegionIdstring

传统型负载均衡实例的地域 ID。展开详情

示例值:cn-hangzhou参考取值来源:
    DescribeRegions
LoadBalancerIdstring

传统型负载均衡实例的 ID。

示例值:lb-bp1o94dp5i6earr****参考取值来源:
    CreateLoadBalancer
    DescribeLoadBalancers
Bandwidthinteger<int32>

监听的带宽峰值。单位:Mbps。展开详情

示例值:-1取值 <= 5120
ListenerPortinteger<int32>

实例前端使用的端口。展开详情

示例值:80取值 <= 65535
BackendServerPortinteger<int32>

实例后端使用的端口,取值范围:1~65535展开详情

示例值:80取值 <= 65535
Tagarray<object>

标签列表。

子级条数 <= 20
XForwardedForstring

是否通过X-Forwarded-For获取来访者客户端 IP。取值:展开详情

示例值:on
Schedulerstring

调度算法。取值:展开详情

示例值:wrr
StickySessionstring

是否开启会话保持。取值:展开详情

示例值:on
StickySessionTypestring

Cookie 的处理方式。取值:insertserver展开详情

示例值:insert
CookieTimeoutinteger<int32>

Cookie 超时时间。单位:秒。展开详情

示例值:500取值 <= 86400
Cookiestring

服务器上配置的 Cookie。展开详情

示例值:testCookie
HealthCheckstring

是否开启健康检查。取值:展开详情

示例值:on
HealthCheckMethodstring

监听 HTTP 类型健康检查的健康检查方法。取值:headget展开详情

示例值:get
HealthCheckDomainstring

用于健康检查的域名。取值:展开详情

示例值:172.XX.XX.16
HealthCheckURIstring

用于健康检查的 URI。展开详情

示例值:/test/index.html
HealthyThresholdinteger<int32>

健康检查连续成功多少次后,将后端服务器的健康检查状态由 fail 判定为 success展开详情

示例值:4取值 <= 10
UnhealthyThresholdinteger<int32>

健康检查连续失败多少次后,将后端服务器的健康检查状态由 success 判定为 fail展开详情

示例值:4取值 <= 10
HealthCheckTimeoutinteger<int32>

接收来自运行状况检查的响应需要等待的时间。如果后端 ECS 在指定的时间内没有正确响应,则判定为健康检查失败。单位:秒。取值:1~300展开详情

示例值:3取值 <= 300
HealthCheckConnectPortinteger<int32>

健康检查使用的端口。展开详情

示例值:8080取值 <= 65535
HealthCheckIntervalinteger<int32>

健康检查的时间间隔。单位:秒。展开详情

示例值:5取值 <= 50
HealthCheckHttpCodestring

健康检查正常的 HTTP 状态码,多个状态码用半角逗号(,)分割。展开详情

示例值:http_2xx,http_3xx
ServerCertificateIdstring

服务器证书的 ID。

示例值:idkp-123-cn-test-****参考取值来源:
    UploadServerCertificate
    DescribeServerCertificates
VServerGroupIdstring

服务器组 ID。

示例值:rsp-cige6j5e7p****参考取值来源:
    CreateVServerGroup
    DescribeVServerGroups
    SetVServerGroupAttribute
    AddVServerGroupBackendServers
    RemoveVServerGroupBackendServers
    ModifyVServerGroupBackendServers
CACertificateIdstring

CA 证书 ID。展开详情

示例值:139a00604ad-cn-east-hangzh****参考取值来源:
    UploadCACertificate
    DescribeCACertificates
XForwardedFor_SLBIPstring

是否通过SLB-IP头字段获取来访者的 VIP(Virtual IP address)。取值:展开详情

示例值:on
XForwardedFor_SLBIDstring

是否通过SLB-ID头字段获取 SLB 实例 ID。取值:展开详情

示例值:on参考取值来源:
    DescribeLoadBalancerListeners
XForwardedFor_protostring

是否通过X-Forwarded-Proto头字段获取 SLB 的监听协议。取值:展开详情

示例值:on
Gzipstring

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

示例值:on
AclIdstring

监听绑定的访问策略组 ID。展开详情

示例值:acl-a2do9e413e0spzasx****
AclTypestring

访问控制类型。取值:展开详情

示例值:white
AclStatusstring

是否开启访问控制功能。取值:展开详情

示例值:off
Descriptionstring

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

示例值:HTTPS_443
IdleTimeoutinteger<int32>

指定连接空闲超时时间,取值范围为1~60,默认值为 15。单位:秒。展开详情

示例值:12取值 <= 9999
RequestTimeoutinteger<int32>

指定请求超时时间,取值范围为1~180,默认值为 60。单位:秒。展开详情

示例值:23取值 <= 9999
EnableHttp2string

是否开启 HTTP2 特性。取值:展开详情

示例值:off
TLSCipherPolicystring

安全策略包含 HTTPS 可选的 TLS 协议版本和配套的加密算法套件。展开详情

示例值:tls_cipher_policy_1_1参考取值来源:
    CreateTLSCipherPolicy
XForwardedFor_SLBPORTstring

是否通过XForwardedFor_SLBPORT头字段获取负载均衡实例的监听端口。取值:展开详情

示例值:off
XForwardedFor_ClientSrcPortstring

是否通过XForwardedFor_ClientSrcPort头字段获取访问负载均衡实例客户端的端口。取值:展开详情

示例值:off

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:CEF72CEB-54B6-4AE8-B225-F876FF7BA984

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
ParamDuplicateError
The specified parameter value of XForwardedFor_ClientCertSubjectDNAlias is duplicate. Please change to a different one.诊断
400
IpVersionConflict
The ip version of this LoadBalancer and the Acl is conflict.诊断
400
InvalidParameter.IdleTimeout
The specified IdleTimeout exceeds the limit.诊断
400
InvalidParameter.RequestTimeout
The specified RequestTimeout exceeds the limit.诊断
400
ListenerForwardNotSupport
X-Forward-For is not supported to a ipv6 instance.诊断
400
InvalidParameter.RegionNotSupport
The region does not support the parameter: %s.诊断
400
InvalidParameter.SpecNotSupport
The loadBalancer of shared spec does not support the parameter: %s.诊断
400
ListenerProcessing
A previous configuration of the listener is pending,please try again later.诊断
400
Certkey.Forbidden
The specified certkey is not owned by the current user.诊断
400
InvalidParameter.ListenerPortConflict
There is conflict listener port exists.诊断
400
ResourceNotAvailible.HttpsListener
The specified Zone did not have enough resource.诊断
400
AclNotExist
Acl does not exist.诊断
400
OperationUnsupported.CreateLoadBalancerLayer7Listener
The slb instance does not support create HTTP or HTTPS listener.诊断
400
InvalidParameter.VServerGroupId
The MasterSlaveServerGroup can not be attached to HTTP or HTTPS listener.诊断
400
MissingParam.HealthCheckDomain
The HealthCheckDomain is required when HealthCheckHttpVersion is http1.1.诊断
400
InvalidParameter.HealthCheckHttpVersion
The param HealthCheckHttpVersion is invalid.诊断
400
Duplicated.AclEntry
%s.诊断
400
CertificateNotExist
The specified CertificateId does not exist.诊断
400
OperationFailed.InsufficientResources
The loadbalancer does not support this operation because of insufficient resources.诊断
400
InvalidTLSPolicyId.NotExist
The specified TLS cipher policy does not exist.诊断
400
TLSPolicyConfiguring
The specified TLS cipher policy is configuring.诊断
400
TLSCipherPolicyVipRelationOverLimit
The number of listeners associated with a policy has exceeded.诊断
400
CertificateTypeMismatched
The certificate type does not match.诊断
400
MissingParam.ServerCertificates
Server certificates are required.诊断
400
TooManyCertificates
The number of certificates must not be greater than one.诊断
400
CnCertificateNotSupport
The cn certificate is not support.诊断
400
InvalidParam.CertificateBindingType
The param CertificateBindingType is invalid.诊断
400
InvalidParamSize.ServerCertificates
The size of param ServerCertificates is invalid.诊断
400
TooManyCertificates.ServerCertificates
The number of certificates must not be greater than one.诊断
400
SPEC_NOT_SUPPORT_PARAMETER
Share spec does not support the feature.诊断
400
LbNotSupportTcpssl
You cannot create a TCP SSL type listener for the specified load balancer.诊断
400
LbSupportTcpsslOnly
The specified load balancer supports TCP SSL type listener only.诊断
400
ListenerNotSupportRule
You cannot create a rule for the specified listener.诊断
400
Mismatch.SlbSpecTypeAndListenerProtocol
The SlbSpecType and ListenerProtocol are mismatched.诊断
400
InvalidParam.TagValue
%s.诊断
400
InvalidParam.TagKey
%s.诊断
400
SizeLimitExceeded.Tag
%s.诊断
400
MissingParam.TagKey
The param MissingParam.TagKey is missing.诊断
400
AclListenerOverLimit
This acl has reached the limit of binding to listeners.诊断
400
QuotaLimitExceeds.AclAttachedToListener
The number of Acl bound listeners has reached the quota limit诊断
400
QuotaLimitExceeds.TotalAclEntry
The number of Acl entries has reached the quota limit.诊断
404
ResourceNotFound.Certificate
The specified resource is not found.诊断

变更历史

变更时间变更内容概要操作
2025-01-08
变更错误码400
2024-12-25
变更请求参数StickySession
2023-12-14
新增请求参数XForwardedFor_SLBPORT
新增请求参数XForwardedFor_ClientSrcPort
2023-06-02
变更请求参数Tag
2021-09-24
新增错误码404

相关示例

创建UDP/TCP/HTTP/HTTPS监听、查询和修改监听的配置
2021-11-16
2024年08月20日