Skip to content

HealthCheckTemplate

This class encapsulates and extends the ROS resource type ALIYUN::ALB::HealthCheckTemplate, which is used to create a health check template.

Initializers

import ros_cdk_alb
ros_cdk_alb.HealthCheckTemplate(
  scope: Construct,
  id: str,
  health_check_template_name: typing.Union[str, IResolvable],
  health_check_codes: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
  health_check_connect_port: typing.Union[typing.Union[int, float], IResolvable] = None,
  health_check_host: typing.Union[str, IResolvable] = None,
  health_check_interval: typing.Union[typing.Union[int, float], IResolvable] = None,
  health_check_method: typing.Union[str, IResolvable] = None,
  health_check_path: typing.Union[str, IResolvable] = None,
  health_check_protocol: typing.Union[str, IResolvable] = None,
  health_check_timeout: typing.Union[typing.Union[int, float], IResolvable] = None,
  healthy_threshold: typing.Union[typing.Union[int, float], IResolvable] = None,
  unhealthy_threshold: typing.Union[typing.Union[int, float], IResolvable] = None,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
health_check_template_name typing.Union[str, ros_cdk_core.IResolvable] Property healthCheckTemplateName: The name of the health check template.
health_check_codes typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] Property healthCheckCodes: The HTTP status code for a successful health check.
health_check_connect_port typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property healthCheckConnectPort: The port that is used for health checks.
health_check_host typing.Union[str, ros_cdk_core.IResolvable] Property healthCheckHost: The domain name that is used for health checks.
health_check_interval typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property healthCheckInterval: The interval between two consecutive health checks.
health_check_method typing.Union[str, ros_cdk_core.IResolvable] Property healthCheckMethod: The HTTP method that is used for health checks.
health_check_path typing.Union[str, ros_cdk_core.IResolvable] Property healthCheckPath: The URL path that is used for health checks.
health_check_protocol typing.Union[str, ros_cdk_core.IResolvable] Property healthCheckProtocol: The protocol that is used for health checks.
health_check_timeout typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property healthCheckTimeout: The timeout period of a health check.
healthy_threshold typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property healthyThreshold: The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy.
unhealthy_threshold typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property unhealthyThreshold: The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

health_check_template_nameRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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.


health_check_codesOptional

  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]

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.


health_check_connect_portOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

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.


health_check_hostOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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.


health_check_intervalOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property healthCheckInterval: The interval between two consecutive health checks.

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


health_check_methodOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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.


health_check_pathOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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.


health_check_protocolOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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.


health_check_timeoutOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

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.


healthy_thresholdOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

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.


unhealthy_thresholdOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

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.


enable_resource_property_constraintOptional

  • Type: bool

Methods

Name Description
to_string Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
add_condition No description.
add_count No description.
add_dependency No description.
add_resource_desc No description.
apply_removal_policy No description.
get_att No description.
set_metadata No description.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.

is_construct

import ros_cdk_alb
ros_cdk_alb.HealthCheckTemplate.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
ref str No description.
stack ros_cdk_core.Stack The stack in which this resource is defined.
resource ros_cdk_core.RosResource No description.
attr_health_check_template_id ros_cdk_core.IResolvable Attribute HealthCheckTemplateId: The ID of the health check template.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_health_check_template_idRequired

attr_health_check_template_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute HealthCheckTemplateId: The ID of the health check template.