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 |
---|---|---|---|---|---|
HealthCheckInterval | Integer | No | Yes | The interval between consecutive health checks. | Valid values: 1 to 50.
Default value: 2. Unit: seconds. |
HealthCheckConnectPort | Integer | No | Yes | The port that you want to use for health checks. | Valid values: 0 to 65535. Default value: 0. This value indictaes that the port of a backend server is used for health checks. |
HealthCheckCodes | List | No | Yes | The HTTP status codes for a successful health check. | Valid values:
Note This property only takes effect when you set the HealthCheckProtocol property to HTTP
or gRPC.
|
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. |
HealthCheckMethod | String | No | Yes | The method that you want to use for health checks. | Default value: HEAD. Valid values:
Note This property only takes effect when you set the HealthCheckProtocol property to HTTP
or gRPC.
|
HealthCheckPath | String | No | Yes | The URL path that you want to use for health checks. | The URL path must be 1 to 80 characters in length, and can contain letters, digits,
the - / . % ? # & special characters, and the _ ; ~ ! ( ) * [ ] @ $ ^ : ' , + extended
characters. The URL path must start with a forward slash (/).
Note This property only takes effect when you set the HealthCheckProtocol property to HTTP.
|
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. |
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 only takes effect when you set the HealthCheckProtocol property to HTTP.
|
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. |
HealthCheckProtocol | String | No | Yes | The protocol that you want to use for health checks. | Default value: HTTP. 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 the HealthCheckTimeout property is smaller than the value of the HealthCheckInterval
property, the timeout period specified by the HealthCheckTimeout property becomes
invalid and the value of the HealthCheckInterval property is used as the timeout period.
|
Return values
Fn::GetAtt
HealthCheckTemplateId: the ID of the health check template.
Examples
-
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" ] } } } }