Skip to content

HealthCheckTemplateProps

Properties for defining a HealthCheckTemplate.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-alb-healthchecktemplate

Initializer

using AlibabaCloud.SDK.ROS.CDK.Alb;
new HealthCheckTemplateProps {
    object HealthCheckTemplateName,
    object HealthCheckCodes = null,
    object HealthCheckConnectPort = null,
    object HealthCheckHost = null,
    object HealthCheckInterval = null,
    object HealthCheckMethod = null,
    object HealthCheckPath = null,
    object HealthCheckProtocol = null,
    object HealthCheckTimeout = null,
    object HealthyThreshold = null,
    object UnhealthyThreshold = null
};

Properties

Name Type Description
HealthCheckTemplateName object Property healthCheckTemplateName: The name of the health check template.
HealthCheckCodes object Property healthCheckCodes: The HTTP status code for a successful health check.
HealthCheckConnectPort object Property healthCheckConnectPort: The port that is used for health checks.
HealthCheckHost object Property healthCheckHost: The domain name that is used for health checks.
HealthCheckInterval object Property healthCheckInterval: The interval between two consecutive health checks.
HealthCheckMethod object Property healthCheckMethod: The HTTP method that is used for health checks.
HealthCheckPath object Property healthCheckPath: The URL path that is used for health checks.
HealthCheckProtocol object Property healthCheckProtocol: The protocol that is used for health checks.
HealthCheckTimeout object Property healthCheckTimeout: The timeout period of a health check.
HealthyThreshold object Property healthyThreshold: The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy.
UnhealthyThreshold object Property unhealthyThreshold: The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy.

HealthCheckTemplateNameRequired

public object HealthCheckTemplateName { get; set; }
  • Type: object

Property healthCheckTemplateName: 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.


HealthCheckCodesOptional

public object HealthCheckCodes { get; set; }
  • Type: object

Property healthCheckCodes: The HTTP status code for a successful health check.

If HealthCheckProtocol is set to HTTP, HealthCheckCodes can be set to http_2xx (default), http_3xx, http_4xx, and http_5xx. Separate multiple HTTP status codes with commas (,). If HealthCheckProtocol is set to gRPC, HealthCheckCodes can be set to 0 to 99. Default value: 0. Value ranges are supported. You can enter at most 20 value ranges and must separate them with commas (,). Note This parameter is required only if the HealthCheckProtocol parameter is set to HTTP.


HealthCheckConnectPortOptional

public object HealthCheckConnectPort { get; set; }
  • Type: object

Property healthCheckConnectPort: The port that is used for health checks.

Valid values: 0 to 65535. Default value: 0. This value indicates that the port on a backend server is used for health checks.


HealthCheckHostOptional

public object HealthCheckHost { get; set; }
  • Type: object

Property healthCheckHost: The domain name that is used for health checks.

Default value: $SERVER_IP. The domain name is 1 to 80 characters in length. Make sure that the destination CIDR block meets the following requirements: The domain name can contain lowercase letters, digits, hyphens (-), and periods (.). The domain name contains at least one period (.) but does not start or end with a period (.). The rightmost domain label can contain only letters, and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). This parameter is required only if the HealthCheckProtocol parameter is set to HTTP.


HealthCheckIntervalOptional

public object HealthCheckInterval { get; set; }
  • Type: object

Property healthCheckInterval: The interval between two consecutive health checks.

Unit: seconds. Valid values: 1 to 50. Default value: 2.


HealthCheckMethodOptional

public object HealthCheckMethod { get; set; }
  • Type: object

Property healthCheckMethod: The HTTP method that is used for health checks.

Valid values: HEAD: By default, the ALB instance sends HEAD requests to a backend server to perform HTTP health checks. POST: By default, gRPC health checks use the POST method. GET: If the length of a response exceeds 8 KB, the response is truncated. However, the health check result is not affected. Note This parameter is required only if the HealthCheckProtocol parameter is set to HTTP.


HealthCheckPathOptional

public object HealthCheckPath { get; set; }
  • Type: object

Property healthCheckPath: The URL path that is used for health checks.

It must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). It can also contain the following extended characters: _ ; ~ ! ( ) * [ ] @ $ ^ : ' , +. The URL path must start with a forward slash (/). Note This parameter is required only if the HealthCheckProtocol parameter is set to HTTP.


HealthCheckProtocolOptional

public object HealthCheckProtocol { get; set; }
  • Type: object

Property healthCheckProtocol: The protocol that is used for health checks.

Valid values: HTTP: The ALB instance sends HEAD or GET requests to a backend server to simulate access from a browser and check whether the backend server is healthy. This is the default protocol. TCP: To perform TCP health checks, ALB sends SYN packets to a backend server to check whether the port of the backend server is available to receive requests. GRPC: To perform gRPC health checks, ALB sends POST or GET requests to a backend server to check whether the backend server is healthy.


HealthCheckTimeoutOptional

public object HealthCheckTimeout { get; set; }
  • Type: object

Property healthCheckTimeout: The timeout period of a health check.

Unit: seconds. If a backend server does not respond within the specified timeout period, the backend server fails the health check. Valid values: 1 to 300. Default value: 5. Note If the value of the HealthCheckTimeout parameter is smaller than that of the HealthCheckInterval parameter, the timeout period specified by the HealthCheckTimeout parameter is ignored and the value of the HealthCheckInterval parameter is used as the timeout period.


HealthyThresholdOptional

public object HealthyThreshold { get; set; }
  • Type: object

Property healthyThreshold: The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy.

In this case, the health status is changed from fail to success. Valid values: 2 to 10. Default value: 3.


UnhealthyThresholdOptional

public object UnhealthyThreshold { get; set; }
  • Type: object

Property unhealthyThreshold: The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy.

In this case, the health status is changed from success to fail. Valid values: 2 to 10. Default value: 3.