Load Balancer Monitor Args
data class LoadBalancerMonitorArgs(val accountId: Output<String>? = null, val allowInsecure: Output<Boolean>? = null, val consecutiveDown: Output<Int>? = null, val consecutiveUp: Output<Int>? = null, val description: Output<String>? = null, val expectedBody: Output<String>? = null, val expectedCodes: Output<String>? = null, val followRedirects: Output<Boolean>? = null, val header: Output<Map<String, List<String>>>? = null, val interval: Output<Int>? = null, val method: Output<String>? = null, val path: Output<String>? = null, val port: Output<Int>? = null, val probeZone: Output<String>? = null, val retries: Output<Int>? = null, val timeout: Output<Int>? = null, val type: Output<String>? = null) : ConvertibleToJava<LoadBalancerMonitorArgs>
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleLoadBalancerMonitor = new cloudflare.LoadBalancerMonitor("example_load_balancer_monitor", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
allowInsecure: true,
consecutiveDown: 0,
consecutiveUp: 0,
description: "Login page monitor",
expectedBody: "alive",
expectedCodes: "2xx",
followRedirects: true,
header: {
Host: ["example.com"],
"X-App-ID": ["abc123"],
},
interval: 0,
method: "GET",
path: "/health",
port: 0,
probeZone: "example.com",
retries: 0,
timeout: 0,
type: "http",
});
Content copied to clipboard
import pulumi
import pulumi_cloudflare as cloudflare
example_load_balancer_monitor = cloudflare.LoadBalancerMonitor("example_load_balancer_monitor",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
allow_insecure=True,
consecutive_down=0,
consecutive_up=0,
description="Login page monitor",
expected_body="alive",
expected_codes="2xx",
follow_redirects=True,
header={
"Host": ["example.com"],
"X-App-ID": ["abc123"],
},
interval=0,
method="GET",
path="/health",
port=0,
probe_zone="example.com",
retries=0,
timeout=0,
type="http")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleLoadBalancerMonitor = new Cloudflare.LoadBalancerMonitor("example_load_balancer_monitor", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
AllowInsecure = true,
ConsecutiveDown = 0,
ConsecutiveUp = 0,
Description = "Login page monitor",
ExpectedBody = "alive",
ExpectedCodes = "2xx",
FollowRedirects = true,
Header =
{
{ "Host", new[]
{
"example.com",
} },
{ "X-App-ID", new[]
{
"abc123",
} },
},
Interval = 0,
Method = "GET",
Path = "/health",
Port = 0,
ProbeZone = "example.com",
Retries = 0,
Timeout = 0,
Type = "http",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewLoadBalancerMonitor(ctx, "example_load_balancer_monitor", &cloudflare.LoadBalancerMonitorArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
AllowInsecure: pulumi.Bool(true),
ConsecutiveDown: pulumi.Int(0),
ConsecutiveUp: pulumi.Int(0),
Description: pulumi.String("Login page monitor"),
ExpectedBody: pulumi.String("alive"),
ExpectedCodes: pulumi.String("2xx"),
FollowRedirects: pulumi.Bool(true),
Header: pulumi.StringArrayMap{
"Host": pulumi.StringArray{
pulumi.String("example.com"),
},
"X-App-ID": pulumi.StringArray{
pulumi.String("abc123"),
},
},
Interval: pulumi.Int(0),
Method: pulumi.String("GET"),
Path: pulumi.String("/health"),
Port: pulumi.Int(0),
ProbeZone: pulumi.String("example.com"),
Retries: pulumi.Int(0),
Timeout: pulumi.Int(0),
Type: pulumi.String("http"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.LoadBalancerMonitor;
import com.pulumi.cloudflare.LoadBalancerMonitorArgs;
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 exampleLoadBalancerMonitor = new LoadBalancerMonitor("exampleLoadBalancerMonitor", LoadBalancerMonitorArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.allowInsecure(true)
.consecutiveDown(0)
.consecutiveUp(0)
.description("Login page monitor")
.expectedBody("alive")
.expectedCodes("2xx")
.followRedirects(true)
.header(Map.ofEntries(
Map.entry("Host", "example.com"),
Map.entry("X-App-ID", "abc123")
))
.interval(0)
.method("GET")
.path("/health")
.port(0)
.probeZone("example.com")
.retries(0)
.timeout(0)
.type("http")
.build());
}
}
Content copied to clipboard
resources:
exampleLoadBalancerMonitor:
type: cloudflare:LoadBalancerMonitor
name: example_load_balancer_monitor
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
allowInsecure: true
consecutiveDown: 0
consecutiveUp: 0
description: Login page monitor
expectedBody: alive
expectedCodes: 2xx
followRedirects: true
header:
Host:
- example.com
X-App-ID:
- abc123
interval: 0
method: GET
path: /health
port: 0
probeZone: example.com
retries: 0
timeout: 0
type: http
Content copied to clipboard
Import
$ pulumi import cloudflare:index/loadBalancerMonitor:LoadBalancerMonitor example '<account_id>/<monitor_id>'
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(accountId: Output<String>? = null, allowInsecure: Output<Boolean>? = null, consecutiveDown: Output<Int>? = null, consecutiveUp: Output<Int>? = null, description: Output<String>? = null, expectedBody: Output<String>? = null, expectedCodes: Output<String>? = null, followRedirects: Output<Boolean>? = null, header: Output<Map<String, List<String>>>? = null, interval: Output<Int>? = null, method: Output<String>? = null, path: Output<String>? = null, port: Output<Int>? = null, probeZone: Output<String>? = null, retries: Output<Int>? = null, timeout: Output<Int>? = null, type: Output<String>? = null)
Properties
Link copied to clipboard
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
Link copied to clipboard
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
Link copied to clipboard
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
Link copied to clipboard
Object description.
Link copied to clipboard
A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.
Link copied to clipboard
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
Link copied to clipboard
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.