ALIYUN::ALB::HealthCheckTemplate is used to create a health check template.
Syntax
{
"Type": "ALIYUN::ALB::HealthCheckTemplate",
"Properties": {
"HealthCheckInterval": Integer,
"HealthCheckConnectPort": Integer,
"HealthCheckCodes": List,
"UnhealthyThreshold": Integer,
"HealthCheckMethod": String,
"HealthCheckPath": String,
"HealthCheckTemplateName": String,
"HealthCheckHost": String,
"HealthyThreshold": Integer,
"HealthCheckProtocol": String,
"HealthCheckTimeout": Integer
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
HealthCheckTemplateName | String | Yes | Yes | The name of the health check template. | The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. |
HealthCheckCodes | List | No | Yes | The HTTP status codes for a successful health check. | Valid values:
Note This property takes effect only if you set HealthCheckProtocol to HTTP or gRPC. |
HealthCheckConnectPort | Integer | No | Yes | The port that you want to use for health checks. | Valid values: 0 to 65535. Default value: 0. This value specifies that the port of a backend server is used for health checks. |
HealthCheckHost | String | No | Yes | The domain name that you want to use for health checks. | Default value: $SERVER_IP. The domain name must be 1 to 80 characters in length. The domain name must meet the following requirements:
Note This property takes effect only if you set HealthCheckProtocol to HTTP. |
HealthCheckInterval | Integer | No | Yes | The interval at which the system performs health checks. | Valid values: 1 to 50. Default value: 2. Unit: seconds. |
HealthCheckMethod | String | No | Yes | The method that you want to use for health checks. | Valid values:
Note This property takes effect only if you set HealthCheckProtocol to HTTP or gRPC. |
HealthCheckPath | String | No | Yes | The URL that you want to use for health checks. | The URL must be 1 to 80 characters in length and can contain letters, digits, the - / . % ? # & special characters, and the _ ; ~ ! ( ) * [ ] @ $ ^ : ' , + extended characters. The URL must start with a forward slash (/). Note This property takes effect only if you set HealthCheckProtocol to HTTP. |
HealthCheckProtocol | String | No | Yes | The protocol that you want to use for health checks. | Valid values:
|
HealthCheckTimeout | Integer | No | Yes | The timeout period of a health check response. | If a backend server does not return a health check response within the specified timeout period, the server fails the health check. Valid values: 1 to 300. Default value: 5. Unit: seconds. Note If the value of HealthCheckTimeout is smaller than the value of HealthCheckInterval, the timeout period specified by HealthCheckTimeout becomes invalid, and the value of HealthCheckInterval is used as the timeout period. |
HealthyThreshold | Integer | No | Yes | The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. When this number is reached, the health check status is changed from failed to successful. | Valid values: 2 to 10. Default value: 3. |
UnhealthyThreshold | Integer | No | Yes | The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. When this number is reached, the health check status is changed from successful to failed. | Valid values: 2 to 10. Default value: 3. |
Return values
Fn::GetAtt
HealthCheckTemplateId: the ID of the health check template.
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
HealthCheckTemplateName:
Type: String
Description: |-
The name of the health check template.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods
(.), underscores (_), and hyphens (-). The name must start with a letter.
Resources:
HealthCheckTemplate:
Type: ALIYUN::ALB::HealthCheckTemplate
Properties:
HealthCheckTemplateName:
Ref: HealthCheckTemplateName
Outputs:
HealthCheckTemplateId:
Description: The ID of the health check template.
Value:
Fn::GetAtt:
- HealthCheckTemplate
- HealthCheckTemplateId
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"HealthCheckTemplateName": {
"Type": "String",
"Description": "The name of the health check template.\nThe name must be 2 to 128 characters in length, and can contain letters, digits, periods\n(.), underscores (_), and hyphens (-). The name must start with a letter."
}
},
"Resources": {
"HealthCheckTemplate": {
"Type": "ALIYUN::ALB::HealthCheckTemplate",
"Properties": {
"HealthCheckTemplateName": {
"Ref": "HealthCheckTemplateName"
}
}
}
},
"Outputs": {
"HealthCheckTemplateId": {
"Description": "The ID of the health check template.",
"Value": {
"Fn::GetAtt": [
"HealthCheckTemplate",
"HealthCheckTemplateId"
]
}
}
}
}