alicloud.alb.HealthCheckTemplate
Explore with Pulumi AI
Provides a 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 example = new alicloud.alb.HealthCheckTemplate("example", {healthCheckTemplateName: "example_name"});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.alb.HealthCheckTemplate("example", health_check_template_name="example_name")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := alb.NewHealthCheckTemplate(ctx, "example", &alb.HealthCheckTemplateArgs{
HealthCheckTemplateName: pulumi.String("example_name"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Alb.HealthCheckTemplate("example", new()
{
HealthCheckTemplateName = "example_name",
});
});
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) {
var example = new HealthCheckTemplate("example", HealthCheckTemplateArgs.builder()
.healthCheckTemplateName("example_name")
.build());
}
}
resources:
example:
type: alicloud:alb:HealthCheckTemplate
properties:
healthCheckTemplateName: example_name
Create HealthCheckTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new HealthCheckTemplate(name: string, args: HealthCheckTemplateArgs, opts?: CustomResourceOptions);
@overload
def HealthCheckTemplate(resource_name: str,
args: HealthCheckTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def HealthCheckTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
health_check_template_name: Optional[str] = None,
health_check_host: Optional[str] = None,
health_check_connect_port: Optional[int] = None,
dry_run: Optional[bool] = None,
health_check_http_version: Optional[str] = None,
health_check_interval: Optional[int] = None,
health_check_method: Optional[str] = None,
health_check_path: Optional[str] = None,
health_check_protocol: Optional[str] = None,
health_check_codes: Optional[Sequence[str]] = None,
health_check_timeout: Optional[int] = None,
healthy_threshold: Optional[int] = None,
unhealthy_threshold: Optional[int] = None)
func NewHealthCheckTemplate(ctx *Context, name string, args HealthCheckTemplateArgs, opts ...ResourceOption) (*HealthCheckTemplate, error)
public HealthCheckTemplate(string name, HealthCheckTemplateArgs args, CustomResourceOptions? opts = null)
public HealthCheckTemplate(String name, HealthCheckTemplateArgs args)
public HealthCheckTemplate(String name, HealthCheckTemplateArgs args, CustomResourceOptions options)
type: alicloud:alb:HealthCheckTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args HealthCheckTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args HealthCheckTemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HealthCheckTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HealthCheckTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HealthCheckTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var healthCheckTemplateResource = new AliCloud.Alb.HealthCheckTemplate("healthCheckTemplateResource", new()
{
HealthCheckTemplateName = "string",
HealthCheckHost = "string",
HealthCheckConnectPort = 0,
DryRun = false,
HealthCheckHttpVersion = "string",
HealthCheckInterval = 0,
HealthCheckMethod = "string",
HealthCheckPath = "string",
HealthCheckProtocol = "string",
HealthCheckCodes = new[]
{
"string",
},
HealthCheckTimeout = 0,
HealthyThreshold = 0,
UnhealthyThreshold = 0,
});
example, err := alb.NewHealthCheckTemplate(ctx, "healthCheckTemplateResource", &alb.HealthCheckTemplateArgs{
HealthCheckTemplateName: pulumi.String("string"),
HealthCheckHost: pulumi.String("string"),
HealthCheckConnectPort: pulumi.Int(0),
DryRun: pulumi.Bool(false),
HealthCheckHttpVersion: pulumi.String("string"),
HealthCheckInterval: pulumi.Int(0),
HealthCheckMethod: pulumi.String("string"),
HealthCheckPath: pulumi.String("string"),
HealthCheckProtocol: pulumi.String("string"),
HealthCheckCodes: pulumi.StringArray{
pulumi.String("string"),
},
HealthCheckTimeout: pulumi.Int(0),
HealthyThreshold: pulumi.Int(0),
UnhealthyThreshold: pulumi.Int(0),
})
var healthCheckTemplateResource = new HealthCheckTemplate("healthCheckTemplateResource", HealthCheckTemplateArgs.builder()
.healthCheckTemplateName("string")
.healthCheckHost("string")
.healthCheckConnectPort(0)
.dryRun(false)
.healthCheckHttpVersion("string")
.healthCheckInterval(0)
.healthCheckMethod("string")
.healthCheckPath("string")
.healthCheckProtocol("string")
.healthCheckCodes("string")
.healthCheckTimeout(0)
.healthyThreshold(0)
.unhealthyThreshold(0)
.build());
health_check_template_resource = alicloud.alb.HealthCheckTemplate("healthCheckTemplateResource",
health_check_template_name="string",
health_check_host="string",
health_check_connect_port=0,
dry_run=False,
health_check_http_version="string",
health_check_interval=0,
health_check_method="string",
health_check_path="string",
health_check_protocol="string",
health_check_codes=["string"],
health_check_timeout=0,
healthy_threshold=0,
unhealthy_threshold=0)
const healthCheckTemplateResource = new alicloud.alb.HealthCheckTemplate("healthCheckTemplateResource", {
healthCheckTemplateName: "string",
healthCheckHost: "string",
healthCheckConnectPort: 0,
dryRun: false,
healthCheckHttpVersion: "string",
healthCheckInterval: 0,
healthCheckMethod: "string",
healthCheckPath: "string",
healthCheckProtocol: "string",
healthCheckCodes: ["string"],
healthCheckTimeout: 0,
healthyThreshold: 0,
unhealthyThreshold: 0,
});
type: alicloud:alb:HealthCheckTemplate
properties:
dryRun: false
healthCheckCodes:
- string
healthCheckConnectPort: 0
healthCheckHost: string
healthCheckHttpVersion: string
healthCheckInterval: 0
healthCheckMethod: string
healthCheckPath: string
healthCheckProtocol: string
healthCheckTemplateName: string
healthCheckTimeout: 0
healthyThreshold: 0
unhealthyThreshold: 0
HealthCheckTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The HealthCheckTemplate resource accepts the following input properties:
- Health
Check stringTemplate Name - 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.
- Dry
Run bool - Whether to precheck the API request.
- Health
Check List<string>Codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check intConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - Health
Check stringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check intInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - Health
Check stringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - Health
Check intTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - Healthy
Threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - Unhealthy
Threshold int - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- Health
Check stringTemplate Name - 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.
- Dry
Run bool - Whether to precheck the API request.
- Health
Check []stringCodes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check intConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - Health
Check stringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check intInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - Health
Check stringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - Health
Check intTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - Healthy
Threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - Unhealthy
Threshold int - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- health
Check StringTemplate Name - 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.
- dry
Run Boolean - Whether to precheck the API request.
- health
Check List<String>Codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check IntegerConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - health
Check StringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check IntegerInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - health
Check StringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - health
Check IntegerTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - healthy
Threshold Integer - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - unhealthy
Threshold Integer - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- health
Check stringTemplate Name - 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.
- dry
Run boolean - Whether to precheck the API request.
- health
Check string[]Codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check numberConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - health
Check stringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check stringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check numberInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - health
Check stringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check stringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check stringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - health
Check numberTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - healthy
Threshold number - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - unhealthy
Threshold number - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- health_
check_ strtemplate_ name - 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.
- dry_
run bool - Whether to precheck the API request.
- health_
check_ Sequence[str]codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ intconnect_ port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - health_
check_ strhost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ strhttp_ version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ intinterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - health_
check_ strmethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ strpath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ strprotocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - health_
check_ inttimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - healthy_
threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - unhealthy_
threshold int - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- health
Check StringTemplate Name - 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.
- dry
Run Boolean - Whether to precheck the API request.
- health
Check List<String>Codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check NumberConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - health
Check StringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check NumberInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - health
Check StringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - health
Check NumberTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - healthy
Threshold Number - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - unhealthy
Threshold Number - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
Outputs
All input properties are implicitly available as output properties. Additionally, the HealthCheckTemplate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing HealthCheckTemplate Resource
Get an existing HealthCheckTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: HealthCheckTemplateState, opts?: CustomResourceOptions): HealthCheckTemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dry_run: Optional[bool] = None,
health_check_codes: Optional[Sequence[str]] = None,
health_check_connect_port: Optional[int] = None,
health_check_host: Optional[str] = None,
health_check_http_version: Optional[str] = None,
health_check_interval: Optional[int] = None,
health_check_method: Optional[str] = None,
health_check_path: Optional[str] = None,
health_check_protocol: Optional[str] = None,
health_check_template_name: Optional[str] = None,
health_check_timeout: Optional[int] = None,
healthy_threshold: Optional[int] = None,
unhealthy_threshold: Optional[int] = None) -> HealthCheckTemplate
func GetHealthCheckTemplate(ctx *Context, name string, id IDInput, state *HealthCheckTemplateState, opts ...ResourceOption) (*HealthCheckTemplate, error)
public static HealthCheckTemplate Get(string name, Input<string> id, HealthCheckTemplateState? state, CustomResourceOptions? opts = null)
public static HealthCheckTemplate get(String name, Output<String> id, HealthCheckTemplateState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Dry
Run bool - Whether to precheck the API request.
- Health
Check List<string>Codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check intConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - Health
Check stringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check intInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - Health
Check stringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - Health
Check stringTemplate Name - 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 intTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - Healthy
Threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - Unhealthy
Threshold int - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- Dry
Run bool - Whether to precheck the API request.
- Health
Check []stringCodes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check intConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - Health
Check stringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check intInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - Health
Check stringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - Health
Check stringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - Health
Check stringTemplate Name - 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 intTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - Healthy
Threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - Unhealthy
Threshold int - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- dry
Run Boolean - Whether to precheck the API request.
- health
Check List<String>Codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check IntegerConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - health
Check StringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check IntegerInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - health
Check StringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - health
Check StringTemplate Name - 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 IntegerTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - healthy
Threshold Integer - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - unhealthy
Threshold Integer - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- dry
Run boolean - Whether to precheck the API request.
- health
Check string[]Codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check numberConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - health
Check stringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check stringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check numberInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - health
Check stringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check stringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check stringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - health
Check stringTemplate Name - 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 numberTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - healthy
Threshold number - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - unhealthy
Threshold number - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- dry_
run bool - Whether to precheck the API request.
- health_
check_ Sequence[str]codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ intconnect_ port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - health_
check_ strhost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ strhttp_ version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ intinterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - health_
check_ strmethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ strpath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health_
check_ strprotocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - health_
check_ strtemplate_ name - 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_ inttimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - healthy_
threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - unhealthy_
threshold int - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
- dry
Run Boolean - Whether to precheck the API request.
- health
Check List<String>Codes - The HTTP status code that indicates a successful health check. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check NumberConnect Port - The number of the port that is used for health checks. Valid values:
0
to65535
. Default value:0
. This default value indicates that the backend server is used for health checks. - health
Check StringHost - The domain name that is used for health checks. Default value:
$SERVER_IP
. The domain name must be 1 to 80 characters in length. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringHttp Version - The version of the HTTP protocol. Valid values:
HTTP1.0
andHTTP1.1
. Default value:HTTP1.1
. NOTE: The attributeHealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check NumberInterval - The time interval between two consecutive health checks. Valid values:
1
to50
. Unit: seconds. Default value:2
. - health
Check StringMethod - The health check method. Valid values: GET and HEAD. Default value: HEAD. NOTE: The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringPath - The URL that is used for health checks. The URL 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 (&). The URL can also contain the following extended characters: _ ; ~ ! ( )* [ ] @ $ ^ : ' , +. The URL must start with a forward slash (/). **NOTE:** The attribute
HealthCheckProtocol
is valid when the attribute isHTTP
. - health
Check StringProtocol - The protocol that is used for health checks. Valid values:
HTTP
andTCP
. Default value:HTTP
. - health
Check StringTemplate Name - 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 NumberTimeout - The timeout period of a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails. Valid values:
1
to300
. Unit: seconds. Default value:5
. - healthy
Threshold Number - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy (from fail to success). Valid values:
2
to10
. Default value:3
. Unit: seconds. - unhealthy
Threshold Number - The number of times that an healthy backend server must consecutively fail health checks before it is declared unhealthy (from success to fail). Valid values:
2
to10
. Default value:3
. Unit: seconds.
Import
Application Load Balancer (ALB) Health Check Template can be imported using the id, e.g.
$ pulumi import alicloud:alb/healthCheckTemplate:HealthCheckTemplate example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.