ALIYUN::GA::Listener

更新时间:
复制 MD 格式

Creates a listener for a Global Accelerator (GA) instance.

Syntax

{
  "Type": "ALIYUN::GA::Listener",
  "Properties": {
    "Description": String,
    "PortRanges": List,
    "Protocol": String,
    "AcceleratorId": String,
    "Name": String,
    "ClientAffinity": String,
    "Certificates": List,
    "SecurityPolicyId": String,
    "ProxyProtocol": Boolean,
    "XForwardedForConfig": Map
  }
}

Properties

Property Type Required Update allowed Description Constraints
Description String No Yes The description of the listener. None
PortRanges List Yes Yes The listening ports. A maximum of 10 listening ports are supported.

For more information, see the PortRanges property.

Protocol String Yes Yes The network transport protocol for the listener. Valid values:
  • tcp: TCP.
  • udp: UDP.
  • http: HTTP.
  • https: HTTPS.
AcceleratorId String Yes No The ID of the Global Accelerator instance. None
Name String No Yes The name of the listener. The name must be 2 to 128 characters long. It must start with a letter or a Chinese character. It can contain letters, Chinese characters, digits, underscores (_), and hyphens (-).
ClientAffinity String No Yes The client affinity setting. Valid values:
  • None (default): No client affinity. Requests from the same client are not guaranteed to be directed to the same endpoint.
  • SOURCE_IP: Client affinity is maintained. When a client accesses a stateful application, all requests from that client are directed to the same endpoint, regardless of the source port or protocol.
Certificates List No Yes The SSL certificate. For more information, see the Certificates property.
SecurityPolicyId String No Yes The ID of the security policy. Valid values:
  • tls_cipher_policy_1_0
    • Supported TLS versions: TLSv1.0, TLSv1.1, and TLSv1.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: TLSv1.1 and TLSv1.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: TLSv1.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: TLSv1.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: TLSv1.2 and TLSv1.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 supported only by HTTPS listeners.
ProxyProtocol Boolean No Yes Whether to preserve the source IP address of the client. Valid values:
  • true: Preserves the source IP address of the client.

    After this feature is enabled, backend services can view the source IP addresses of clients.

  • false (default): Does not preserve the source IP address of the client.
Note This parameter will no longer be configured using listener APIs. Configure this parameter using the APIs for endpoint groups.

For more information about ProxyProtocol, see CreateEndpointGroup and UpdateEndpointGroup.

XForwardedForConfig Map No Yes XForward field configuration. For more information, see the XForwardedForConfig property.

Certificates syntax

"Certificates": [
 {
    "Id": String
  }
]

Certificates properties

Property Name Type Required Update allowed Description Constraints
Id String Yes Yes The ID of the SSL certificate.
Note This parameter is required only for HTTPS listeners.

XForwardedForConfig syntax

"XForwardedForConfig": {
 "XRealIpEnabled": Boolean,
 "XForwardedForGaIdEnabled": Boolean,
 "XForwardedForGaApEnabled": Boolean,
 "XForwardedForPortEnabled": Boolean,
 "XForwardedForProtoEnabled": Boolean
}

XForwardedForConfig properties

Property Name Type Required Update allowed Description Constraints
XRealIpEnabled Boolean No Yes Whether to use the X-Real-IP header to retrieve the real IP addresses of clients. Valid values:
  • true: Uses the X-Real-IP header to retrieve the real IP addresses of clients.
  • false (default): Does not use the X-Real-IP header to retrieve the real IP addresses of clients.
Note This parameter is supported only by HTTP and HTTPS listeners.
XForwardedForGaIdEnabled Boolean No Yes Whether to use the GA-ID header to retrieve the ID of the Global Accelerator instance. Valid values:
  • true: Uses the GA-ID header to retrieve the ID of the Global Accelerator instance.
  • false (default): Does not use the GA-ID header to retrieve the ID of the Global Accelerator instance.
Note This parameter is supported only by HTTP and HTTPS listeners.
XForwardedForGaApEnabled Boolean No Yes Whether to use the GA-AP header to retrieve the acceleration region information. Valid values:
  • true: Uses the GA-AP header to retrieve the acceleration region information.
  • false (default): Does not use the GA-AP header to retrieve the acceleration region information.
Note This parameter is supported only by HTTP and HTTPS listeners.
XForwardedForPortEnabled Boolean No Yes Whether to use the GA-X-Forward-Port header to retrieve the listening port of the Global Accelerator instance. Valid values:
  • true: Uses the GA-X-Forward-Port header to retrieve the listening port of the Global Accelerator instance.
  • false (default): Does not use the GA-X-Forward-Port header to retrieve the listening port of the Global Accelerator instance.
Note This parameter is supported only by HTTP and HTTPS listeners.
XForwardedForProtoEnabled Boolean No Yes Whether to use the GA-X-Forward-Proto header to retrieve the listening protocol of the Global Accelerator instance. Valid values:
  • true: Uses the GA-X-Forward-Proto header to retrieve the listening protocol of the Global Accelerator instance.
  • false (default): Does not use the GA-X-Forward-Proto header to retrieve the listening protocol of the Global Accelerator instance.
Note This parameter is supported only by HTTP and HTTPS listeners.

PortRanges syntax

"PortRanges": [
  {
    "FromPort": Integer,
    "ToPort": Integer
  }
]

PortRanges properties

Property name Type Required Update allowed Description Constraints
FromPort Integer Yes Yes The first port in the listening port range used to receive and forward requests to endpoints. None
ToPort Integer Yes Yes The last port in the listening port range used to receive and forward requests to endpoints. None

Return value

Fn::GetAtt

ListenerId: The ID of the listener.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      AcceleratorId:
        Type: String
        Description: The ID of the Global Accelerator instance to which the listener will be added.
    Resources:
      Listener:
        Type: ALIYUN::GA::Listener
        Properties:
          PortRanges:
            - FromPort: 336
              ToPort: 335
          Protocol: tcp
          AcceleratorId:
            Ref: AcceleratorId
          Name: TestListener
          ClientAffinity: NONE
    Outputs:
      ListenerId:
        Description: The ID of the listener.
        Value:
          Fn::GetAtt:
            - Listener
            - ListenerId
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "AcceleratorId": {
          "Type": "String",
          "Description": "The ID of the Global Accelerator instance to which the listener will be added."
        }
      },
      "Resources": {
        "Listener": {
          "Type": "ALIYUN::GA::Listener",
          "Properties": {
            "PortRanges": [
              {
                "FromPort": 336,
                "ToPort": 335
              }
            ],
            "Protocol": "tcp",
            "AcceleratorId": {
              "Ref": "AcceleratorId"
            },
            "Name": "TestListener",
            "ClientAffinity": "NONE"
          }
        }
      },
      "Outputs": {
        "ListenerId": {
          "Description": "The ID of the listener.",
          "Value": {
            "Fn::GetAtt": [
              "Listener",
              "ListenerId"
            ]
          }
        }
      }
    }