1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. LoadBalancerMonitor
Cloudflare v6.0.0 published on Monday, Apr 14, 2025 by Pulumi

cloudflare.LoadBalancerMonitor

Explore with Pulumi AI

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

Create LoadBalancerMonitor Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new LoadBalancerMonitor(name: string, args: LoadBalancerMonitorArgs, opts?: CustomResourceOptions);
@overload
def LoadBalancerMonitor(resource_name: str,
                        args: LoadBalancerMonitorArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def LoadBalancerMonitor(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        account_id: Optional[str] = None,
                        allow_insecure: Optional[bool] = None,
                        consecutive_down: Optional[int] = None,
                        consecutive_up: Optional[int] = None,
                        description: Optional[str] = None,
                        expected_body: Optional[str] = None,
                        expected_codes: Optional[str] = None,
                        follow_redirects: Optional[bool] = None,
                        header: Optional[Mapping[str, Sequence[str]]] = None,
                        interval: Optional[int] = None,
                        method: Optional[str] = None,
                        path: Optional[str] = None,
                        port: Optional[int] = None,
                        probe_zone: Optional[str] = None,
                        retries: Optional[int] = None,
                        timeout: Optional[int] = None,
                        type: Optional[str] = None)
func NewLoadBalancerMonitor(ctx *Context, name string, args LoadBalancerMonitorArgs, opts ...ResourceOption) (*LoadBalancerMonitor, error)
public LoadBalancerMonitor(string name, LoadBalancerMonitorArgs args, CustomResourceOptions? opts = null)
public LoadBalancerMonitor(String name, LoadBalancerMonitorArgs args)
public LoadBalancerMonitor(String name, LoadBalancerMonitorArgs args, CustomResourceOptions options)
type: cloudflare:LoadBalancerMonitor
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. LoadBalancerMonitorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. LoadBalancerMonitorArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. LoadBalancerMonitorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LoadBalancerMonitorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LoadBalancerMonitorArgs
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 loadBalancerMonitorResource = new Cloudflare.LoadBalancerMonitor("loadBalancerMonitorResource", new()
{
    AccountId = "string",
    AllowInsecure = false,
    ConsecutiveDown = 0,
    ConsecutiveUp = 0,
    Description = "string",
    ExpectedBody = "string",
    ExpectedCodes = "string",
    FollowRedirects = false,
    Header = 
    {
        { "string", new[]
        {
            "string",
        } },
    },
    Interval = 0,
    Method = "string",
    Path = "string",
    Port = 0,
    ProbeZone = "string",
    Retries = 0,
    Timeout = 0,
    Type = "string",
});
Copy
example, err := cloudflare.NewLoadBalancerMonitor(ctx, "loadBalancerMonitorResource", &cloudflare.LoadBalancerMonitorArgs{
	AccountId:       pulumi.String("string"),
	AllowInsecure:   pulumi.Bool(false),
	ConsecutiveDown: pulumi.Int(0),
	ConsecutiveUp:   pulumi.Int(0),
	Description:     pulumi.String("string"),
	ExpectedBody:    pulumi.String("string"),
	ExpectedCodes:   pulumi.String("string"),
	FollowRedirects: pulumi.Bool(false),
	Header: pulumi.StringArrayMap{
		"string": pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	Interval:  pulumi.Int(0),
	Method:    pulumi.String("string"),
	Path:      pulumi.String("string"),
	Port:      pulumi.Int(0),
	ProbeZone: pulumi.String("string"),
	Retries:   pulumi.Int(0),
	Timeout:   pulumi.Int(0),
	Type:      pulumi.String("string"),
})
Copy
var loadBalancerMonitorResource = new LoadBalancerMonitor("loadBalancerMonitorResource", LoadBalancerMonitorArgs.builder()
    .accountId("string")
    .allowInsecure(false)
    .consecutiveDown(0)
    .consecutiveUp(0)
    .description("string")
    .expectedBody("string")
    .expectedCodes("string")
    .followRedirects(false)
    .header(Map.of("string", "string"))
    .interval(0)
    .method("string")
    .path("string")
    .port(0)
    .probeZone("string")
    .retries(0)
    .timeout(0)
    .type("string")
    .build());
Copy
load_balancer_monitor_resource = cloudflare.LoadBalancerMonitor("loadBalancerMonitorResource",
    account_id="string",
    allow_insecure=False,
    consecutive_down=0,
    consecutive_up=0,
    description="string",
    expected_body="string",
    expected_codes="string",
    follow_redirects=False,
    header={
        "string": ["string"],
    },
    interval=0,
    method="string",
    path="string",
    port=0,
    probe_zone="string",
    retries=0,
    timeout=0,
    type="string")
Copy
const loadBalancerMonitorResource = new cloudflare.LoadBalancerMonitor("loadBalancerMonitorResource", {
    accountId: "string",
    allowInsecure: false,
    consecutiveDown: 0,
    consecutiveUp: 0,
    description: "string",
    expectedBody: "string",
    expectedCodes: "string",
    followRedirects: false,
    header: {
        string: ["string"],
    },
    interval: 0,
    method: "string",
    path: "string",
    port: 0,
    probeZone: "string",
    retries: 0,
    timeout: 0,
    type: "string",
});
Copy
type: cloudflare:LoadBalancerMonitor
properties:
    accountId: string
    allowInsecure: false
    consecutiveDown: 0
    consecutiveUp: 0
    description: string
    expectedBody: string
    expectedCodes: string
    followRedirects: false
    header:
        string:
            - string
    interval: 0
    method: string
    path: string
    port: 0
    probeZone: string
    retries: 0
    timeout: 0
    type: string
Copy

LoadBalancerMonitor Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LoadBalancerMonitor resource accepts the following input properties:

AccountId This property is required. string
Identifier
AllowInsecure bool
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
ConsecutiveDown int
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
ConsecutiveUp int
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
Description string
Object description.
ExpectedBody string
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.
ExpectedCodes string
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
FollowRedirects bool
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
Header Dictionary<string, ImmutableArray<string>>
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
Interval int
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
Method string
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
Path string
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
Port int
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
ProbeZone string
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
Retries int
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
Timeout int
The timeout (in seconds) before marking the health check as failed.
Type string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
AccountId This property is required. string
Identifier
AllowInsecure bool
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
ConsecutiveDown int
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
ConsecutiveUp int
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
Description string
Object description.
ExpectedBody string
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.
ExpectedCodes string
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
FollowRedirects bool
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
Header map[string][]string
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
Interval int
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
Method string
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
Path string
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
Port int
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
ProbeZone string
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
Retries int
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
Timeout int
The timeout (in seconds) before marking the health check as failed.
Type string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
accountId This property is required. String
Identifier
allowInsecure Boolean
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
consecutiveDown Integer
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
consecutiveUp Integer
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
description String
Object description.
expectedBody String
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.
expectedCodes String
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
followRedirects Boolean
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
header Map<String,List<String>>
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
interval Integer
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
method String
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
path String
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
port Integer
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
probeZone String
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
retries Integer
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
timeout Integer
The timeout (in seconds) before marking the health check as failed.
type String
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
accountId This property is required. string
Identifier
allowInsecure boolean
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
consecutiveDown number
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
consecutiveUp number
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
description string
Object description.
expectedBody string
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.
expectedCodes string
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
followRedirects boolean
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
header {[key: string]: string[]}
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
interval number
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
method string
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
path string
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
port number
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
probeZone string
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
retries number
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
timeout number
The timeout (in seconds) before marking the health check as failed.
type string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
account_id This property is required. str
Identifier
allow_insecure bool
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
consecutive_down int
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
consecutive_up int
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
description str
Object description.
expected_body str
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.
expected_codes str
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
follow_redirects bool
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
header Mapping[str, Sequence[str]]
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
interval int
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
method str
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
path str
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
port int
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
probe_zone str
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
retries int
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
timeout int
The timeout (in seconds) before marking the health check as failed.
type str
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
accountId This property is required. String
Identifier
allowInsecure Boolean
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
consecutiveDown Number
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
consecutiveUp Number
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
description String
Object description.
expectedBody String
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.
expectedCodes String
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
followRedirects Boolean
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
header Map<List<String>>
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
interval Number
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
method String
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
path String
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
port Number
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
probeZone String
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
retries Number
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
timeout Number
The timeout (in seconds) before marking the health check as failed.
type String
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".

Outputs

All input properties are implicitly available as output properties. Additionally, the LoadBalancerMonitor resource produces the following output properties:

CreatedOn string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
CreatedOn string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
createdOn String
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
createdOn string
id string
The provider-assigned unique ID for this managed resource.
modifiedOn string
created_on str
id str
The provider-assigned unique ID for this managed resource.
modified_on str
createdOn String
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String

Look up Existing LoadBalancerMonitor Resource

Get an existing LoadBalancerMonitor 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?: LoadBalancerMonitorState, opts?: CustomResourceOptions): LoadBalancerMonitor
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        allow_insecure: Optional[bool] = None,
        consecutive_down: Optional[int] = None,
        consecutive_up: Optional[int] = None,
        created_on: Optional[str] = None,
        description: Optional[str] = None,
        expected_body: Optional[str] = None,
        expected_codes: Optional[str] = None,
        follow_redirects: Optional[bool] = None,
        header: Optional[Mapping[str, Sequence[str]]] = None,
        interval: Optional[int] = None,
        method: Optional[str] = None,
        modified_on: Optional[str] = None,
        path: Optional[str] = None,
        port: Optional[int] = None,
        probe_zone: Optional[str] = None,
        retries: Optional[int] = None,
        timeout: Optional[int] = None,
        type: Optional[str] = None) -> LoadBalancerMonitor
func GetLoadBalancerMonitor(ctx *Context, name string, id IDInput, state *LoadBalancerMonitorState, opts ...ResourceOption) (*LoadBalancerMonitor, error)
public static LoadBalancerMonitor Get(string name, Input<string> id, LoadBalancerMonitorState? state, CustomResourceOptions? opts = null)
public static LoadBalancerMonitor get(String name, Output<String> id, LoadBalancerMonitorState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:LoadBalancerMonitor    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AccountId string
Identifier
AllowInsecure bool
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
ConsecutiveDown int
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
ConsecutiveUp int
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
CreatedOn string
Description string
Object description.
ExpectedBody string
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.
ExpectedCodes string
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
FollowRedirects bool
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
Header Dictionary<string, ImmutableArray<string>>
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
Interval int
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
Method string
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
ModifiedOn string
Path string
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
Port int
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
ProbeZone string
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
Retries int
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
Timeout int
The timeout (in seconds) before marking the health check as failed.
Type string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
AccountId string
Identifier
AllowInsecure bool
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
ConsecutiveDown int
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
ConsecutiveUp int
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
CreatedOn string
Description string
Object description.
ExpectedBody string
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.
ExpectedCodes string
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
FollowRedirects bool
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
Header map[string][]string
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
Interval int
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
Method string
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
ModifiedOn string
Path string
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
Port int
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
ProbeZone string
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
Retries int
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
Timeout int
The timeout (in seconds) before marking the health check as failed.
Type string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
accountId String
Identifier
allowInsecure Boolean
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
consecutiveDown Integer
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
consecutiveUp Integer
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
createdOn String
description String
Object description.
expectedBody String
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.
expectedCodes String
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
followRedirects Boolean
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
header Map<String,List<String>>
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
interval Integer
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
method String
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
modifiedOn String
path String
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
port Integer
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
probeZone String
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
retries Integer
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
timeout Integer
The timeout (in seconds) before marking the health check as failed.
type String
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
accountId string
Identifier
allowInsecure boolean
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
consecutiveDown number
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
consecutiveUp number
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
createdOn string
description string
Object description.
expectedBody string
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.
expectedCodes string
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
followRedirects boolean
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
header {[key: string]: string[]}
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
interval number
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
method string
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
modifiedOn string
path string
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
port number
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
probeZone string
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
retries number
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
timeout number
The timeout (in seconds) before marking the health check as failed.
type string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
account_id str
Identifier
allow_insecure bool
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
consecutive_down int
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
consecutive_up int
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
created_on str
description str
Object description.
expected_body str
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.
expected_codes str
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
follow_redirects bool
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
header Mapping[str, Sequence[str]]
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
interval int
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
method str
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
modified_on str
path str
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
port int
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
probe_zone str
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
retries int
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
timeout int
The timeout (in seconds) before marking the health check as failed.
type str
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".
accountId String
Identifier
allowInsecure Boolean
Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.
consecutiveDown Number
To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.
consecutiveUp Number
To be marked healthy the monitored origin must pass this healthcheck N consecutive times.
createdOn String
description String
Object description.
expectedBody String
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.
expectedCodes String
The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.
followRedirects Boolean
Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.
header Map<List<String>>
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.
interval Number
The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.
method String
The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.
modifiedOn String
path String
The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.
port Number
The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).
probeZone String
Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.
retries Number
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
timeout Number
The timeout (in seconds) before marking the health check as failed.
type String
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Available values: "http", "https", "tcp", "udpicmp", "icmpping", "smtp".

Import

$ pulumi import cloudflare:index/loadBalancerMonitor:LoadBalancerMonitor example '<account_id>/<monitor_id>'
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.