All Products
Search
Document Center

Global Accelerator:CreateListener

Last Updated:Apr 10, 2024

A listener checks connection requests and distributes the requests to endpoints based on forwarding rules that are defined by the scheduling algorithm. You can call the CreateListener operation to create a listener for a GA instance.

Operation description

When you call this operation, take note of the following items:

  • CreateListener is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeListener operation to query the status of the task.

    • If the listener is in the init state, the listener is being created. In this state, you can perform only query operations.
    • If the listener is in the active state, the listener is created.
  • You cannot repeatedly call the CreateListener operation for the same GA instance within the specified period of time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ga:CreateListenerWrite
  • Listener
    acs:ga:{#regionId}:{#accountId}:listener/*
  • Accelerator
    acs:ga:{#regionId}:{#accountId}:ga/{#acceleratorId}
  • ga:TLSVersion
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou.

cn-hangzhou
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId is different for each API request.
123e4567-e89b-12d3-a456-426655440000
AcceleratorIdstringYes

The ID of the GA instance.

ga-bp1odcab8tmno0hdq****
NamestringNo

The name of the listener.

The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

Listener
DescriptionstringNo

The description of the listener. The description can be at most 200 characters in length.

Listener
ClientAffinitystringNo

Specifies whether to enable client affinity for the listener.

  • If this parameter is left empty, client affinity is disabled. After client affinity is disabled, requests from a specific client IP address may be forwarded to different endpoints.
  • To enable client affinity, set this parameter to SOURCE_IP. In this case, when a client accesses stateful applications, requests from the same client are forwarded to the same endpoint regardless of the source port or protocol.
SOURCE_IP
ProtocolstringNo

The network transmission protocol that you want to use for the listener. Valid values:

  • tcp: TCP
  • udp: UDP
  • http: HTTP
  • https: HTTPS
tcp
ProxyProtocolbooleanNo

Specifies whether to preserve client IP addresses. Valid values:

  • true: enables the feature. After client IP addresses are preserved, you can view client IP addresses on the endpoints.
  • false (default): disables the feature.
Note This parameter will be deprecated in the API operations that are used to configure listeners. We recommend that you set this parameter when you call API operations to configure endpoint groups. For more information about the ProxyProtocol parameter, see CreateEndpointGroup and UpdateEndpointGroup .
false
PortRangesobject []Yes

The listener ports. Valid values: 1 to 65499. The maximum number of ports that can be configured depends on the routing type and protocol of the listener. For more information, see Listener overview.

FromPortintegerYes

The first port of the listener port range that you want to use to receive and forward requests to endpoints.

Valid values: 1 to 65499. The value of FromPort must be smaller than or equal to the value of ToPort.

The maximum number of ports that can be configured varies based on the routing type and protocol of the listener. For more information, see Listener overview.

Note You can configure only one listener port for an HTTP or HTTPS listener. In this case, the first port is the same as the last port.
20
ToPortintegerYes

The last port of the listener port range that you want to use to receive and forward requests to endpoints.

Valid values: 1 to 65499. The value of FromPort must be smaller than or equal to the value of ToPort.

The maximum number of ports that can be configured varies based on the routing type and protocol of the listener. For more information, see Listener overview.

Note You can configure only one listener port for an HTTP or HTTPS listener. In this case, the first port is the same as the last port.
20
Certificatesobject []No

The SSL certificates.

IdstringNo

The ID of the SSL certificate.

Note This parameter is required only when you create an HTTPS listener.
449****-cn-hangzhou
XForwardedForConfigobjectNo

The XForward headers.

XForwardedForGaIdEnabledbooleanNo

Specifies whether to use the GA-ID header to retrieve the ID of the GA instance. Valid values:

  • true: yes
  • false (default): no
Note This parameter is available only when you create an HTTPS or HTTP listener.
false
XForwardedForGaApEnabledbooleanNo

Specifies whether to use the GA-AP header to retrieve the information about acceleration regions. Valid values:

  • true: yes
  • false (default): no
Note This parameter is available only when you create an HTTPS or HTTP listener.
false
XForwardedForProtoEnabledbooleanNo

Specifies whether to use the GA-X-Forward-Proto header to retrieve the listener protocol of the GA instance. Valid values:

  • true: yes
  • false (default): no
Note This parameter is available only when you create an HTTPS or HTTP listener.
false
XForwardedForPortEnabledbooleanNo

Specifies whether to use the GA-X-Forward-Port header to retrieve the listener ports of the GA instance. Valid values:

  • true: yes
  • false (default): no
Note This parameter is available only when you create an HTTPS or HTTP listener.
false
XRealIpEnabledbooleanNo

Specifies whether to use the X-Real-IP header to retrieve client IP addresses. Valid values:

  • true: yes
  • false (default): no
Note This parameter is available only when you create an HTTPS or HTTP listener.
false
SecurityPolicyIdstringNo

The ID of the security policy. Valid values:

  • tls_cipher_policy_1_0

    • Supported Transport Layer Security (TLS) versions: TLS 1.0, TLS 1.1, and TLS 1.2
    • Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA.
  • tls_cipher_policy_1_1

    • Supported TLS versions: TLS 1.1 and TLS 1.2
    • Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA.
  • tls_cipher_policy_1_2

    • Supported TLS version: TLS 1.2
    • Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA.
  • tls_cipher_policy_1_2_strict

    • Supported TLS version: TLS 1.2
    • Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA
  • tls_cipher_policy_1_2_strict_with_1_3

    • Supported TLS versions: TLS 1.2 and TLS 1.3
    • Supported cipher suites: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_CCM_SHA256, TLS_AES_128_CCM_8_SHA256, ECDHE-ECDSA-AES128-GCM-SHA256, ECDHE-ECDSA-AES256-GCM-SHA384, ECDHE-ECDSA-AES128-SHA256, ECDHE-ECDSA-AES256-SHA384, ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-ECDSA-AES128-SHA, ECDHE-ECDSA-AES256-SHA, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA
Note This parameter is available only when you create an HTTPS listener.
tls_cipher_policy_1_0
TypestringNo

The routing type of the listener. Valid values:

  • Standard (default): intelligent routing
  • CustomRouting: custom routing
Note
  • Custom routing listeners are in invitational preview. To use custom routing listeners, contact your account manager.
  • You can create only listeners of the same routing type for a standard GA instance. You cannot change the routing types of listeners. For more information, see Listener overview.
  • Standard
    EndpointGroupConfigurationsobject []No

    The endpoint groups that are associated with the intelligent routing listener.

    You can configure up to 10 endpoint groups for an intelligent routing listener.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    EndpointGroupNamestringNo

    The name of the endpoint group that is associated with the intelligent routing listener.

    The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

    You can enter the names of up to 10 endpoint groups.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    test
    EndpointGroupDescriptionstringNo

    The description of the endpoint group that is associated with the intelligent routing listener.

    The description can be up to 256 characters in length and cannot contain http:// or https://.

    You can enter the descriptions of up to 10 endpoint groups.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    test
    EndpointGroupRegionstringNo

    The region ID of the endpoint group that is associated with the intelligent routing listener.

    You can enter the region IDs of up to 10 endpoint groups.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    cn-hangzhou
    TrafficPercentagelongNo

    The traffic distribution ratio. If an intelligent routing listener is associated with multiple endpoint groups, you can configure this parameter to specify the ratio of traffic distributed to each endpoint group.

    Valid values: 1 to 100. Default value: 100.

    You can specify traffic distribution ratios for up to 10 endpoint groups.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    100
    HealthCheckEnabledbooleanNo

    Specifies whether to enable health checks for the endpoint group. Valid values:

    • true
    • false (default)

    You can enable the health check feature for up to 10 endpoint groups.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    false
    HealthCheckIntervalSecondslongNo

    The interval at which health checks are performed. Unit: seconds.

    You can specify up to 10 health check intervals.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    3
    HealthCheckPathstringNo

    The path to which health check requests are sent.

    You can specify up to 10 health check paths.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    /healthcheck
    HealthCheckPortlongNo

    The port that is used for health checks. Valid values: 1 to 65535.

    You can specify up to 10 health check ports.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    20
    HealthCheckProtocolstringNo

    The protocol over which health check requests are sent. Valid values:

    • tcp
    • http
    • https

    You can specify up to 10 health check protocols.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    tcp
    ThresholdCountlongNo

    The number of consecutive health check failures that must occur before a healthy endpoint group is considered unhealthy, or the number of consecutive health check successes that must occur before an unhealthy endpoint group is considered healthy. Valid values: 2 to 10. Default value: 3.

    You can specify the number of successful consecutive health checks or failed consecutive health checks for up to 10 endpoint groups.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    3
    EndpointConfigurationsobject []No

    The endpoint that is associated with the intelligent routing listener.

    TypestringNo

    The type of the endpoint that is associated with the intelligent routing listener. Valid values:

    • Domain: a custom domain name
    • Ip: a custom IP address
    • PublicIp: a public IP address provided by Alibaba Cloud
    • ECS: an Elastic Compute Service (ECS) instance
    • SLB: a Server Load Balancer (SLB) instance
    • ALB: an Application Load Balancer (ALB) instance
    • OSS: an Object Storage Service (OSS) bucket

    You can specify up to 100 endpoint types for an endpoint group of an intelligent routing listener.

    Note
  • If you set Type to Standard, you can configure endpoint groups and endpoints for an intelligent routing listener, and this parameter is required.
  • If you set this parameter to ECS or SLB and the service-linked role AliyunServiceRoleForGaVpcEndpoint does not exist, the system automatically creates the service-linked role.
  • If you set this parameter to ALB and the service-linked role AliyunServiceRoleForGaAlb does not exist, the system automatically creates the service-linked role.
  • If you set this parameter to OSS and the service-linked role AliyunServiceRoleForGaOss does not exist, the system automatically creates the service-linked role.
    For more information, see Service linked roles.
  • Ip
    WeightlongNo

    The weight of the endpoint that is associated with the intelligent routing listener.

    Valid values: 0 to 255.

    You can specify the weights of up to 100 endpoints for an endpoint group of an intelligent routing listener.

    Note
  • If you set Type to Standard, you can configure endpoint groups and endpoints for an intelligent routing listener, and this parameter is required.
  • If you set the weight of an endpoint to 0, GA does not route network traffic to the endpoint. Make sure that you are aware of the impact on your business before you set the endpoint weight to 0.
  • 20
    EndpointstringNo

    The IP address or domain name of the endpoint that is associated with the intelligent routing listener.

    You can specify up to 100 endpoint IP addresses or domain names for an endpoint group of an intelligent routing listener.

    Note If you set Type to Standard, you can configure endpoint groups and endpoints, and this parameter is required.
    47.0.XX.XX
    SubAddressstringNo

    The private IP address of the elastic network interface (ENI).

    Note If the endpoint type is ENI, you can specify this parameter. If you do not specify this parameter, the primary private IP address of the ENI is used.
    172.168.XX.XX
    EndpointRequestProtocolstringNo

    The backend service protocol of the endpoint that is associated with the intelligent routing listener. Valid values:

    • HTTP (default)
    • HTTPS

    You can specify up to 10 backend service protocols.

    Note
  • You can configure endpoint groups and endpoints for an intelligent routing listener only if you set Type to Standard.
  • You can specify this parameter only for HTTP and HTTPS intelligent routing listeners.
  • For an HTTP listener, the protocol must be HTTP.
  • HTTP
    EndpointGroupTypestringNo

    The type of the endpoint group associated with the intelligent routing listener. Valid values:

    • default (default)
    • virtual

    You can specify up to 10 endpoint group types.

    Note
  • You can configure endpoint groups and endpoints for an intelligent routing listener only if you set Type to Standard.
  • Only HTTP intelligent routing listeners and HTTPS intelligent routing listeners support virtual endpoint groups.
  • default
    PortOverridesobject []No

    The port mapping.

    ListenerPortlongNo

    The listener port that is mapped to the endpoint port.

    You can specify up to five listener ports.

    Note
  • You can configure endpoint groups and endpoints for an intelligent routing listener only if you set Type to Standard.
  • Only HTTP and HTTPS intelligent routing listeners support port mappings.
  • The listener port in a port mapping must be the port that is used by the current listener.
  • 443
    EndpointPortlongNo

    The endpoint port that is mapped to the listener port.

    You can specify up to five endpoint ports.

    Note
  • You can configure endpoint groups and endpoints for an intelligent routing listener only if you set Type to Standard.
  • Only HTTP and HTTPS intelligent routing listeners support port mappings.
  • 80
    EnableClientIPPreservationToabooleanNo

    Specifies whether to preserve client IP addresses by using the TCP Option Address (TOA) module. Valid values:

    • true
    • false (default)

    You can specify this parameter for up to 10 endpoint groups.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    false
    EnableClientIPPreservationProxyProtocolbooleanNo

    Specifies whether to use the proxy protocol to preserve client IP addresses. Valid values:

    • true
    • false (default)

    You can specify this parameter for up to 10 endpoint groups.

    Note You can configure endpoint groups and endpoints only if you set Type to Standard.
    false
    CustomRoutingEndpointGroupConfigurationsobject []No

    The endpoint group that is associated with the custom routing listener.

    You can configure at most five endpoint groups for a custom routing listener.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    EndpointGroupRegionstringNo

    The region ID of the endpoint group that is associated with the custom routing listener.

    You can enter the region IDs of up to five endpoint groups.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    cn-hangzhou
    NamestringNo

    The name of the endpoint group that is associated with the custom routing listener.

    The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

    You can specify at most five endpoint group names.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    test
    DescriptionstringNo

    The description of the endpoint group that is associated with the custom routing listener.

    The description cannot exceed 256 characters in length and cannot contain http:// or https://.

    You can specify at most five endpoint group descriptions.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    test
    DestinationConfigurationsobject []No

    The mapping configurations of the endpoint group that is associated with the custom routing listener.

    You need to specify the port ranges and protocols used by the endpoint group. The ports are mapped to listener ports.

    You can specify at most 20 mapping configurations for an endpoint group of a custom routing listener.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    ProtocolsarrayNo

    The protocol used by the endpoint group that is associated with the custom routing listener.

    You can specify up to four protocols in each mapping configuration for an endpoint group of a custom routing listener.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    stringNo

    The protocol used by the endpoint group that is associated with the custom routing listener. Valid values:

    • TCP: TCP
    • UDP: UDP
    • TCP,UDP: TCP and UDP

    You can specify up to four protocols in each mapping configuration for an endpoint group of a custom routing listener.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    TCP
    FromPortintegerNo

    The first port used by the endpoint group that is associated with the custom routing listener.

    Valid values: 1 to 65499. The value of FromPort must be equal to or smaller than the value of ToPort.

    You can specify up to 20 first ports for an endpoint group of a custom routing listener.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    80
    ToPortintegerNo

    The last port used by the endpoint group that is associated with the custom routing listener.

    Valid values: 1 to 65499. The value of FromPort must be equal to or smaller than the value of ToPort.

    You can specify up to 20 last ports for an endpoint group of a custom routing listener.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    80
    EndpointConfigurationsobject []No

    The endpoint that is associated with the custom routing listener.

    You can configure at most 10 endpoints for an endpoint group of a custom routing listener.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    TypestringNo

    The service type of the endpoint that is associated with the custom routing listener.

    Set the value to PrivateSubNet, which specifies a private CIDR block.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    PrivateSubNet
    EndpointstringNo

    The name of the vSwitch that is specified as an endpoint.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    vsw-test01
    TrafficToEndpointPolicystringNo

    The traffic policy for the endpoint that is associated with the custom routing listener. Valid values:

    • DenyAll (default): denies all traffic to the endpoint.
    • AllowAll: allows all traffic to the endpoint.
    • AllowCustom: allows traffic only to specified destinations in the endpoint.

    If you set this parameter to AllowCustom, you must specify IP addresses and port ranges as the destinations to which traffic is distributed. If you specify only IP addresses and do not specify port ranges, GA can forward traffic to the specified IP addresses over all destination ports.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    DenyAll
    PolicyConfigurationsobject []No

    The destination in the endpoint that is associated with the custom routing listener.

    You can specify at most 20 destinations in each endpoint of a custom routing listener.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    AddressstringNo

    The IP address of the destination to which traffic is forwarded.

    This parameter takes effect only if TrafficToEndpointPolicy is set to AllowCustom.

    You can specify up to 20 destination IP addresses for each endpoint of a custom routing listener.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    10.0.XX.XX
    PortRangesobject []No

    The port range of the destination to which traffic is forwarded. The value of this parameter must fall within the port range of the endpoint group.

    If you leave this parameter empty, traffic is distributed to all destination ports.

    This parameter takes effect only if TrafficToEndpointPolicy is set to AllowCustom.

    You can specify port ranges for up to 20 destinations in each endpoint of a custom routing listener. You can specify up to five port ranges for each destination.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    FromPortintegerNo

    The first port of the destination port range. The value of this parameter must be in the port range of the endpoint group.

    This parameter takes effect only if TrafficToEndpointPolicy is set to AllowCustom.

    You can specify port ranges for up to 20 destinations in each endpoint of a custom routing listener. You can specify up to five first ports for each destination.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    80
    ToPortintegerNo

    The last port of the destination port range. The value of this parameter must be in the port range of the endpoint group.

    This parameter takes effect only if TrafficToEndpointPolicy is set to AllowCustom.

    You can specify port ranges for up to 20 destinations in each endpoint of a custom routing listener. You can specify up to five end ports for each destination.

    Note You can configure endpoint groups and endpoints for a custom routing listener only if the Type parameter is set to CustomRouting.
    80
    IdleTimeoutintegerNo

    The timeout period of idle connections. Unit: seconds.

    • TCP: 10-900. Default value: 900. Unit: seconds.
    • UDP: 10-20. Default value: 20. Unit: seconds.
    • HTTP/HTTPS: 1-60. Default value: 15. Unit: seconds.
    900
    RequestTimeoutintegerNo

    The timeout period for HTTP or HTTPS requests. Unit: seconds.

    Valid values: 1 to 180. Default value: 60. Unit: seconds.

    Note This parameter takes effect only for HTTP or HTTPS listeners. If the backend server does not respond within the timeout period, GA returns an HTTP 504 error code to the client.
    15
    HttpVersionstringNo

    The maximum version of the HTTP protocol. Valid values:

    • http3
    • http2 (default)
    • http1.1
    Note Only HTTPS listeners support this parameter.
    http2

    Response parameters

    ParameterTypeDescriptionExample
    object

    The returned information.

    RequestIdstring

    The ID of the request.

    04F0F334-1335-436C-A1D7-6C044FE73368
    ListenerIdstring

    The ID of the listener.

    lsr-bp1bpn0kn908w4nbw****

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
      "ListenerId": "lsr-bp1bpn0kn908w4nbw****"
    }

    Error codes

    HTTP status codeError codeError messageDescription
    400Resource.QuotaFullThe resource quota is exceeded.The number of resources has reached the upper limit.
    400ProtocalIllegal.ListenerThe specified listener protocol is invalid.The specified listener protocol is invalid.
    400NotExist.AcceleratorThe accelerated instance does not exist.The GA instance does not exist.
    400StateError.AcceleratorThe state of the accelerated instance is invalid.The status of the GA instance is invalid.
    400QuotaExceeded.ListenerThe maximum number of listeners is exceeded.The maximum number of listeners is exceeded.
    400QuotaExceeded.ListenerPortThe maximum number of listener ports is exceeded.The maximum number of listener ports is exceeded.
    400NotExist.ListenerPortlistener port %s is not exist-
    400PortRangeIllegal.ListenerThe specified listener port range is invalid.The specified listener port range is invalid.
    400PortRangeIllegal.CountThe hugePort listener only supports one port range.The mass port listener (port number greater than 300) only supports one port range.
    400PortConflict.ListenerThe listener port configuration is in conflict.The listener port configurations are in conflict.
    400PortRangeIllegal.ExceedGaAbilityThe listener port range is invalid. For each accelerator instance, you can only create a listener with port range over 300 for each protocol (TCP and UDP).The listener port range is invalid. For each accelerator instance, you can only create a listener with port range over 300 for each protocol (TCP and UDP).
    400PortRangeIllegal.UDPUDP ports 250, 4789, and 4790 are system reserved ports.-
    400SystemPort.ListenerPorts 65500-65535 are system reserved ports.Ports 65500 to 65535 are reserved by the system.
    400PortRanges.MustOneThe portRanges must be one for HTTPS and HTTP type listener.Only one port is supported for HTTPS and HTTP type listeners.
    400SecurityPolicyId.NotNeedNo security policy ID is required for the listener.No security policy ID is required for the listener.
    400SecurityPolicyIdIllegal.ListenerThe listener security policy ID %s is illegal.The security policy ID of the listener is invalid.
    403Forbbiden.SubUserYou are not authorized to operate on the specified resource because your account was created by another user.The current account is a RAM user and does not have permissions to manage the specified resources.
    403ForbiddenThe user is not authorized to operate on the specified resource.The current account does not have permissions to manage the specified resources.
    500UnknownErrorAn error occurred while processing your request. Please try again. If the error persists, please submit a ticket.An error occurred while the request was being processed. Try again later.

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2024-03-27The Error code has changed. The request parameters of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
      delete Error Codes: 500
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: HttpVersion
    2023-11-06The Error code has changed. The request parameters of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
      delete Error Codes: 500
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: IdleTimeout
      Added Input Parameters: RequestTimeout
    2023-10-25The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
      delete Error Codes: 500
    2023-04-20The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
      delete Error Codes: 500