ALIYUN::GA::EndpointGroup类型用于创建终端节点组。
语法
{
"Type": "ALIYUN::GA::EndpointGroup",
"Properties": {
"HealthCheckIntervalSeconds": Integer,
"EndpointGroupRegion": String,
"TrafficPercentage": Integer,
"Description": String,
"HealthCheckPath": String,
"HealthCheckProtocol": String,
"ThresholdCount": Integer,
"HealthCheckPort": Integer,
"AcceleratorId": String,
"EndpointConfigurations": List,
"Name": String,
"ListenerId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
HealthCheckIntervalSeconds | Integer | 否 | 是 | 健康检查的时间间隔。 | 单位:秒。 |
EndpointGroupRegion | String | 是 | 否 | 终端节点组所属的地域。 | 无 |
TrafficPercentage | Integer | 否 | 是 | 监听有多个终端节点组时的权重。 | 无 |
Description | String | 否 | 是 | 终端节点组描述信息。 | 无 |
HealthCheckPath | String | 否 | 是 | 健康检查路径。 | 无 |
HealthCheckProtocol | String | 否 | 是 | 健康检查的协议。 | 取值:
|
ThresholdCount | Integer | 否 | 是 | 健康检查判定终端节点为不健康的次数。 | 无 |
HealthCheckPort | Integer | 否 | 是 | 健康检查的端口。 | 无 |
AcceleratorId | String | 是 | 否 | 全球加速实例ID。 | 无 |
EndpointConfigurations | List | 是 | 是 | 终端节点。 | 最多设置4个终端节点。
详情请参见EndpointConfigurations属性。 |
Name | String | 否 | 是 | 终端节点组的名称。 | 无 |
ListenerId | String | 是 | 否 | 监听ID。 | 无 |
EndpointConfigurations语法
"EndpointConfigurations": [
{
"Type": String,
"Endpoint": String,
"Weight": Integer
}
]
EndpointConfigurations属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Type | String | 是 | 是 | 终端节点类型。 | 取值:
|
Endpoint | String | 是 | 是 | 终端节点的IP或域名。 | 无 |
Weight | Integer | 是 | 是 | 终端节点的权重。 | 无 |
返回值
Fn::GetAtt
EndpointGroupId:终端节点组ID。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"HealthCheckIntervalSeconds": {
"Type": "Number",
"Description": "The interval between two consecutive health checks. Unit: seconds."
},
"EndpointGroupRegion": {
"Type": "String",
"Description": "The region ID of the endpoint group."
},
"TrafficPercentage": {
"Type": "Number",
"Description": "The weight of the endpoint group when the corresponding listener is associated with\nmultiple endpoint groups."
},
"Description": {
"Type": "String",
"Description": "The description of the endpoint group."
},
"HealthCheckPath": {
"Type": "String",
"Description": "The path set as the destination on the targets for health checks."
},
"HealthCheckProtocol": {
"Type": "String",
"Description": "The protocol that is used to connect with the targets for health checks.\ntcp: TCP protocol\nhttp: HTTP protocol\nhttps: HTTPS protocol",
"AllowedValues": [
"tcp",
"http",
"https"
]
},
"ThresholdCount": {
"Type": "Number",
"Description": "The number of consecutive failed heath checks that must occur before declaring an endpoint unhealthy."
},
"HealthCheckPort": {
"Type": "Number",
"Description": "The port that is used to connect with the targets for health checks."
},
"AcceleratorId": {
"Type": "String",
"Description": "The ID of the Global Accelerator instance with which the endpoint group will be associated."
},
"EndpointConfigurations": {
"Type": "Json",
"Description": "",
"MinLength": 1,
"MaxLength": 4
},
"Name": {
"Type": "String",
"Description": "The name of the endpoint group."
},
"ListenerId": {
"Type": "String",
"Description": "The ID of the listener to be associated with the endpoint group."
}
},
"Resources": {
"EndpointGroup": {
"Type": "ALIYUN::GA::EndpointGroup",
"Properties": {
"HealthCheckIntervalSeconds": {
"Ref": "HealthCheckIntervalSeconds"
},
"EndpointGroupRegion": {
"Ref": "EndpointGroupRegion"
},
"TrafficPercentage": {
"Ref": "TrafficPercentage"
},
"Description": {
"Ref": "Description"
},
"HealthCheckPath": {
"Ref": "HealthCheckPath"
},
"HealthCheckProtocol": {
"Ref": "HealthCheckProtocol"
},
"ThresholdCount": {
"Ref": "ThresholdCount"
},
"HealthCheckPort": {
"Ref": "HealthCheckPort"
},
"AcceleratorId": {
"Ref": "AcceleratorId"
},
"EndpointConfigurations": {
"Ref": "EndpointConfigurations"
},
"Name": {
"Ref": "Name"
},
"ListenerId": {
"Ref": "ListenerId"
}
}
}
},
"Outputs": {
"EndpointGroupId": {
"Description": "The ID of the endpoint group.",
"Value": {
"Fn::GetAtt": [
"EndpointGroup",
"EndpointGroupId"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
HealthCheckIntervalSeconds:
Type: Number
Description: 'The interval between two consecutive health checks. Unit: seconds.'
EndpointGroupRegion:
Type: String
Description: The region ID of the endpoint group.
TrafficPercentage:
Type: Number
Description: >-
The weight of the endpoint group when the corresponding listener is
associated with
multiple endpoint groups.
Description:
Type: String
Description: The description of the endpoint group.
HealthCheckPath:
Type: String
Description: The path set as the destination on the targets for health checks.
HealthCheckProtocol:
Type: String
Description: |-
The protocol that is used to connect with the targets for health checks.
tcp: TCP protocol
http: HTTP protocol
https: HTTPS protocol
AllowedValues:
- tcp
- http
- https
ThresholdCount:
Type: Number
Description: >-
The number of consecutive failed heath checks that must occur before
declaring an endpoint unhealthy.
HealthCheckPort:
Type: Number
Description: The port that is used to connect with the targets for health checks.
AcceleratorId:
Type: String
Description: >-
The ID of the Global Accelerator instance with which the endpoint group
will be associated.
EndpointConfigurations:
Type: Json
Description: ''
MinLength: 1
MaxLength: 4
Name:
Type: String
Description: The name of the endpoint group.
ListenerId:
Type: String
Description: The ID of the listener to be associated with the endpoint group.
Resources:
EndpointGroup:
Type: 'ALIYUN::GA::EndpointGroup'
Properties:
HealthCheckIntervalSeconds:
Ref: HealthCheckIntervalSeconds
EndpointGroupRegion:
Ref: EndpointGroupRegion
TrafficPercentage:
Ref: TrafficPercentage
Description:
Ref: Description
HealthCheckPath:
Ref: HealthCheckPath
HealthCheckProtocol:
Ref: HealthCheckProtocol
ThresholdCount:
Ref: ThresholdCount
HealthCheckPort:
Ref: HealthCheckPort
AcceleratorId:
Ref: AcceleratorId
EndpointConfigurations:
Ref: EndpointConfigurations
Name:
Ref: Name
ListenerId:
Ref: ListenerId
Outputs:
EndpointGroupId:
Description: The ID of the endpoint group.
Value:
'Fn::GetAtt':
- EndpointGroup
- EndpointGroupId