文档

ALIYUN::GA::EndpointGroups

更新时间:

ALIYUN::GA::EndpointGroups类型用于批量创建终端节点组。

语法

{
  "Type": "ALIYUN::GA::EndpointGroups",
  "Properties": {
    "AcceleratorId": String,
    "EndpointGroupConfigurations": List,
    "ListenerId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

AcceleratorId

String

全球加速实例ID。

EndpointGroupConfigurations

List

终端节点组配置列表。

更多信息,请参见EndpointGroupConfigurations属性

ListenerId

String

监听ID。

说明

当该监听协议为HTTPHTTPS时,此时每次仅支持创建一个终端节点组。

EndpointGroupConfigurations语法

"EndpointGroupConfigurations": [
  {
    "HealthCheckIntervalSeconds": Integer,
    "TrafficPercentage": Integer,
    "EndpointGroupName": String,
    "HealthCheckPath": String,
    "ThresholdCount": Integer,
    "HealthCheckEnabled": Boolean,
    "EndpointRequestProtocol": String,
    "PortOverrides": List,
    "EndpointGroupRegion": String,
    "EndpointGroupDescription": String,
    "EnableClientIPPreservationToa": Boolean,
    "HealthCheckProtocol": String,
    "HealthCheckPort": Integer,
    "EndpointConfigurations": List,
    "Tags": List,
    "EndpointGroupType": String,
    "EnableClientIPPreservationProxyProtocol": Boolean
  }
]

EndpointGroupConfigurations属性

属性名称

类型

必须

允许更新

描述

约束

EndpointGroupRegion

String

终端节点组所属的地域ID。

EndpointGroupName

String

终端节点组的名称。

EndpointRequestProtocol

String

后端服务协议。

取值:

  • HTTP

  • HTTPS

EndpointGroupDescription

String

终端节点组的描述信息。

EnableClientIPPreservationToa

Boolean

是否使用TOA方式开启保持客户端源IP功能

取值:

  • true:开启保持客户端源IP功能。

  • false(默认值):不开启保持客户端源IP功能。

EndpointConfigurations

List

终端节点配置信息。

更多信息,请参见EndpointConfigurations属性

EndpointGroupType

String

终端节点组类型。

取值:

  • default:默认终端节点组。

  • virtual:虚拟终端节点组。

EnableClientIPPreservationProxyProtocol

Boolean

是否使用ProxyProtocol方式保留客户端源IP。

取值:

  • true:使用ProxyProtocol方式保留客户端源 IP。

  • false(默认值):不使用ProxyProtocol方式保留客户端源IP。

HealthCheckIntervalSeconds

Integer

健康检查的时间间隔。

单位为秒。

HealthCheckPath

String

健康检查路径。

HealthCheckEnabled

Boolean

是否开启了健康检查。

取值:

  • true:开启健康检查。

  • false:关闭健康检查。

HealthCheckProtocol

String

健康检查的协议。

  • tcp:TCP协议。

  • http:HTTP协议。

  • https:HTTPS协议。

HealthCheckPort

Integer

健康检查的端口。

PortOverrides

List

端口映射关系。

更多信息,请参见PortOverrides属性

TrafficPercentage

Integer

监听实例有多个终端节点组时,配置到不同终端节点组的流量比例。

ThresholdCount

Integer

健康检查判定终端节点为不健康的次数。

Tags

List

终端节点组的标签。

更多信息,请参见Tags属性

PortOverrides语法

"PortOverrides": [
  {
    "ListenerPort": Integer,
    "EndpointPort": Integer
  }
]

PortOverrides属性

属性名称

类型

必须

允许更新

描述

约束

EndpointPort

Integer

终端节点端口。

ListenerPort

Integer

监听端口。

EndpointConfigurations语法

"EndpointConfigurations": [
  {
    "Type": String,
    "Endpoint": String,
    "SubAddress": String,
    "Weight": Integer
  }
]

EndpointConfigurations属性

属性名称

类型

必须

允许更新

描述

约束

Endpoint

String

终端节点的 IP、域名或实例ID。

Type

String

终端节点类型。

取值:

  • Domain:自定义域名。

  • Ip:自定义IP。

  • PublicIp:阿里云公网IP。

  • ECS:阿里云ECS实例。

  • SLB:阿里云SLB实例。

  • ALB:阿里云ALB实例。

  • OSS:阿里云OSS实例。

  • ENI:阿里云弹性网卡。

  • NLB:阿里云NLB实例。

Weight

Integer

终端节点的权重。

SubAddress

String

弹性网卡的私网IP地址。

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

终端节点组的标签键。

Value

String

终端节点组的标签值。

返回值

Fn::GetAtt

EndpointGroupIds:终端节点组ID列表。

示例

说明

请您根据实际情况更改脱敏的参数取值,例如AcceleratorId、ListenerId。

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ExtensionResource:
    Type: ALIYUN::GA::EndpointGroups
    Properties:
      EndpointGroupConfigurations:
        - EndpointGroupName: test382
          EndpointGroupDescription: test_endpoint_group_382
          EndpointGroupRegion: cn-beijing
          TrafficPercentage: 100
          HealthCheckEnabled: false
          HealthCheckIntervalSeconds: 0
          EndpointGroupType: default
          EndpointConfigurations:
            - EnableProxyProtocol: false
              Type: OSS
              EnableClientIPPreservation: false
              Endpoint: beijing-test-delete
              Weight: 255
          Tags:
            - Value: c2
              Key: c2
            - Value: d1
              Key: d1
      AcceleratorId: ga-bp1odcab8tmno0hdq****
      ListenerId: lsr-bp1bpn0kn908w4nbw****
Outputs:
  EndpointGroupIds:
    Description: The IDs of the endpoint groups.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EndpointGroupIds

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::GA::EndpointGroups",
      "Properties": {
        "EndpointGroupConfigurations": [
                {
                    "EndpointGroupName": "test382",
                    "EndpointGroupDescription": "test_endpoint_group_382",
                    "EndpointGroupRegion": "cn-beijing",
                    "TrafficPercentage": 100,
                    "HealthCheckEnabled": false,
                    "HealthCheckIntervalSeconds": 0,
                    "EndpointGroupType": "default",
                    "EndpointConfigurations": [
                        {
                            "EnableProxyProtocol": false,
                            "Type": "OSS",
                            "EnableClientIPPreservation": false,
                            "Endpoint": "beijing-test-delete",
                            "Weight": 255
                        }
                    ],
                    "Tags": [
                        {
                            "Value": "c2",
                            "Key": "c2"
                        },
                        {
                            "Value": "d1",
                            "Key": "d1"
                        }
                    ],
                }
            ],
        "AcceleratorId": "ga-bp1odcab8tmno0hdq****",
        "ListenerId": "lsr-bp1bpn0kn908w4nbw****"
      }
    }
  },
  "Outputs": {
    "EndpointGroupIds": {
      "Description": "The IDs of the endpoint groups.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EndpointGroupIds"
        ]
      }
    }
  }
}