HealthCheckTemplateArgs

data class HealthCheckTemplateArgs(val dryRun: Output<Boolean>? = null, val healthCheckCodes: Output<List<String>>? = null, val healthCheckConnectPort: Output<Int>? = null, val healthCheckHost: Output<String>? = null, val healthCheckHttpVersion: Output<String>? = null, val healthCheckInterval: Output<Int>? = null, val healthCheckMethod: Output<String>? = null, val healthCheckPath: Output<String>? = null, val healthCheckProtocol: Output<String>? = null, val healthCheckTemplateName: Output<String>? = null, val healthCheckTimeout: Output<Int>? = null, val healthyThreshold: Output<Int>? = null, val unhealthyThreshold: Output<Int>? = null) : ConvertibleToJava<HealthCheckTemplateArgs>

Provides an Application Load Balancer (ALB) Health Check Template resource. For information about Application Load Balancer (ALB) Health Check Template and how to use it, see What is Health Check Template.

NOTE: Available since v1.134.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const example = new alicloud.alb.HealthCheckTemplate("example", {healthCheckTemplateName: name});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
example = alicloud.alb.HealthCheckTemplate("example", health_check_template_name=name)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var example = new AliCloud.Alb.HealthCheckTemplate("example", new()
{
HealthCheckTemplateName = name,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := alb.NewHealthCheckTemplate(ctx, "example", &alb.HealthCheckTemplateArgs{
HealthCheckTemplateName: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.alb.HealthCheckTemplate;
import com.pulumi.alicloud.alb.HealthCheckTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var example = new HealthCheckTemplate("example", HealthCheckTemplateArgs.builder()
.healthCheckTemplateName(name)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
example:
type: alicloud:alb:HealthCheckTemplate
properties:
healthCheckTemplateName: ${name}

Import

Application Load Balancer (ALB) Health Check Template can be imported using the id, e.g.

$ pulumi import alicloud:alb/healthCheckTemplate:HealthCheckTemplate example <id>

Constructors

Link copied to clipboard
constructor(dryRun: Output<Boolean>? = null, healthCheckCodes: Output<List<String>>? = null, healthCheckConnectPort: Output<Int>? = null, healthCheckHost: Output<String>? = null, healthCheckHttpVersion: Output<String>? = null, healthCheckInterval: Output<Int>? = null, healthCheckMethod: Output<String>? = null, healthCheckPath: Output<String>? = null, healthCheckProtocol: Output<String>? = null, healthCheckTemplateName: Output<String>? = null, healthCheckTimeout: Output<Int>? = null, healthyThreshold: Output<Int>? = null, unhealthyThreshold: Output<Int>? = null)

Properties

Link copied to clipboard
val dryRun: Output<Boolean>? = null

Whether to precheck the API request.

Link copied to clipboard
val healthCheckCodes: Output<List<String>>? = null

The HTTP status codes that are used to indicate whether the backend server passes the health check. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. NOTE: health_check_codes takes effect only if health_check_protocol is set to HTTP.

Link copied to clipboard
val healthCheckConnectPort: Output<Int>? = null

The port that is used for health checks. Default value: 0. Valid values: 0 to 65535.

Link copied to clipboard
val healthCheckHost: Output<String>? = null

The domain name that is used for health checks. NOTE: health_check_host takes effect only if health_check_protocol is set to HTTP.

Link copied to clipboard
val healthCheckHttpVersion: Output<String>? = null

The version of the HTTP protocol. Default value: HTTP1.1. Valid values: HTTP1.0, HTTP1.1. NOTE: health_check_http_version takes effect only if health_check_protocol is set to HTTP.

Link copied to clipboard
val healthCheckInterval: Output<Int>? = null

The interval at which health checks are performed. Unit: seconds. Default value: 2. Valid values: 1 to 50.

Link copied to clipboard
val healthCheckMethod: Output<String>? = null

The HTTP method that is used for health checks. Default value: HEAD. Valid values: HEAD, GET. NOTE: health_check_method takes effect only if health_check_protocol is set to HTTP.

Link copied to clipboard
val healthCheckPath: Output<String>? = null

The URL that is used for health checks. NOTE: health_check_path takes effect only if health_check_protocol is set to HTTP.

Link copied to clipboard
val healthCheckProtocol: Output<String>? = null

The protocol that is used for health checks. Default value: HTTP. Valid values: HTTP, TCP.

Link copied to clipboard
val healthCheckTemplateName: Output<String>? = null

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.

Link copied to clipboard
val healthCheckTimeout: Output<Int>? = null

The timeout period of a health check. Default value: 5. Valid values: 1 to 300.

Link copied to clipboard
val healthyThreshold: Output<Int>? = null

The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10.

Link copied to clipboard
val unhealthyThreshold: Output<Int>? = null

The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10.

Functions

Link copied to clipboard
open override fun toJava(): HealthCheckTemplateArgs