Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi
cloudflare.getHealthchecks
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleHealthchecks = cloudflare.getHealthchecks({
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_healthchecks = cloudflare.get_healthchecks(zone_id="023e105f4ecef8ad9ca31a8372d0c353")
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.LookupHealthchecks(ctx, &cloudflare.LookupHealthchecksArgs{
ZoneId: "023e105f4ecef8ad9ca31a8372d0c353",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleHealthchecks = Cloudflare.GetHealthchecks.Invoke(new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetHealthchecksArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleHealthchecks = CloudflareFunctions.getHealthchecks(GetHealthchecksArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.build());
}
}
variables:
exampleHealthchecks:
fn::invoke:
function: cloudflare:getHealthchecks
arguments:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
Using getHealthchecks
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getHealthchecks(args: GetHealthchecksArgs, opts?: InvokeOptions): Promise<GetHealthchecksResult>
function getHealthchecksOutput(args: GetHealthchecksOutputArgs, opts?: InvokeOptions): Output<GetHealthchecksResult>
def get_healthchecks(max_items: Optional[int] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetHealthchecksResult
def get_healthchecks_output(max_items: Optional[pulumi.Input[int]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetHealthchecksResult]
func LookupHealthchecks(ctx *Context, args *LookupHealthchecksArgs, opts ...InvokeOption) (*LookupHealthchecksResult, error)
func LookupHealthchecksOutput(ctx *Context, args *LookupHealthchecksOutputArgs, opts ...InvokeOption) LookupHealthchecksResultOutput
> Note: This function is named LookupHealthchecks
in the Go SDK.
public static class GetHealthchecks
{
public static Task<GetHealthchecksResult> InvokeAsync(GetHealthchecksArgs args, InvokeOptions? opts = null)
public static Output<GetHealthchecksResult> Invoke(GetHealthchecksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHealthchecksResult> getHealthchecks(GetHealthchecksArgs args, InvokeOptions options)
public static Output<GetHealthchecksResult> getHealthchecks(GetHealthchecksArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getHealthchecks:getHealthchecks
arguments:
# arguments dictionary
The following arguments are supported:
getHealthchecks Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Results
List<Get
Healthchecks Result> - The items returned by the data source
- Zone
Id string - Identifier
- Max
Items int - Max items to fetch, default: 1000
- Id string
- The provider-assigned unique ID for this managed resource.
- Results
[]Get
Healthchecks Result - The items returned by the data source
- Zone
Id string - Identifier
- Max
Items int - Max items to fetch, default: 1000
- id String
- The provider-assigned unique ID for this managed resource.
- results
List<Get
Healthchecks Result> - The items returned by the data source
- zone
Id String - Identifier
- max
Items Integer - Max items to fetch, default: 1000
- id string
- The provider-assigned unique ID for this managed resource.
- results
Get
Healthchecks Result[] - The items returned by the data source
- zone
Id string - Identifier
- max
Items number - Max items to fetch, default: 1000
- id str
- The provider-assigned unique ID for this managed resource.
- results
Sequence[Get
Healthchecks Result] - The items returned by the data source
- zone_
id str - Identifier
- max_
items int - Max items to fetch, default: 1000
- id String
- The provider-assigned unique ID for this managed resource.
- results List<Property Map>
- The items returned by the data source
- zone
Id String - Identifier
- max
Items Number - Max items to fetch, default: 1000
Supporting Types
GetHealthchecksResult
- Address
This property is required. string - The hostname or IP address of the origin server to run health checks on.
- Check
Regions This property is required. List<string> - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- Consecutive
Fails This property is required. int - The number of consecutive fails required from a health check before changing the health to unhealthy.
- Consecutive
Successes This property is required. int - The number of consecutive successes required from a health check before changing the health to healthy.
- Created
On This property is required. string - Description
This property is required. string - A human-readable description of the health check.
- Failure
Reason This property is required. string - The current failure reason if status is unhealthy.
- Http
Config This property is required. GetHealthchecks Result Http Config - Parameters specific to an HTTP or HTTPS health check.
- Id
This property is required. string - Identifier
- Interval
This property is required. int - The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.
- Modified
On This property is required. string - Name
This property is required. string - A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- Retries
This property is required. int - The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- Status
This property is required. string - The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- Suspended
This property is required. bool - If suspended, no health checks are sent to the origin.
- Tcp
Config This property is required. GetHealthchecks Result Tcp Config - Parameters specific to TCP health check.
- Timeout
This property is required. int - The timeout (in seconds) before marking the health check as failed.
- Type
This property is required. string - The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
- Address
This property is required. string - The hostname or IP address of the origin server to run health checks on.
- Check
Regions This property is required. []string - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- Consecutive
Fails This property is required. int - The number of consecutive fails required from a health check before changing the health to unhealthy.
- Consecutive
Successes This property is required. int - The number of consecutive successes required from a health check before changing the health to healthy.
- Created
On This property is required. string - Description
This property is required. string - A human-readable description of the health check.
- Failure
Reason This property is required. string - The current failure reason if status is unhealthy.
- Http
Config This property is required. GetHealthchecks Result Http Config - Parameters specific to an HTTP or HTTPS health check.
- Id
This property is required. string - Identifier
- Interval
This property is required. int - The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.
- Modified
On This property is required. string - Name
This property is required. string - A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- Retries
This property is required. int - The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- Status
This property is required. string - The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- Suspended
This property is required. bool - If suspended, no health checks are sent to the origin.
- Tcp
Config This property is required. GetHealthchecks Result Tcp Config - Parameters specific to TCP health check.
- Timeout
This property is required. int - The timeout (in seconds) before marking the health check as failed.
- Type
This property is required. string - The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
- address
This property is required. String - The hostname or IP address of the origin server to run health checks on.
- check
Regions This property is required. List<String> - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive
Fails This property is required. Integer - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive
Successes This property is required. Integer - The number of consecutive successes required from a health check before changing the health to healthy.
- created
On This property is required. String - description
This property is required. String - A human-readable description of the health check.
- failure
Reason This property is required. String - The current failure reason if status is unhealthy.
- http
Config This property is required. GetHealthchecks Result Http Config - Parameters specific to an HTTP or HTTPS health check.
- id
This property is required. String - Identifier
- interval
This property is required. Integer - The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.
- modified
On This property is required. String - name
This property is required. String - A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- retries
This property is required. Integer - The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- status
This property is required. String - The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- suspended
This property is required. Boolean - If suspended, no health checks are sent to the origin.
- tcp
Config This property is required. GetHealthchecks Result Tcp Config - Parameters specific to TCP health check.
- timeout
This property is required. Integer - The timeout (in seconds) before marking the health check as failed.
- type
This property is required. String - The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
- address
This property is required. string - The hostname or IP address of the origin server to run health checks on.
- check
Regions This property is required. string[] - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive
Fails This property is required. number - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive
Successes This property is required. number - The number of consecutive successes required from a health check before changing the health to healthy.
- created
On This property is required. string - description
This property is required. string - A human-readable description of the health check.
- failure
Reason This property is required. string - The current failure reason if status is unhealthy.
- http
Config This property is required. GetHealthchecks Result Http Config - Parameters specific to an HTTP or HTTPS health check.
- id
This property is required. string - Identifier
- interval
This property is required. number - The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.
- modified
On This property is required. string - name
This property is required. string - A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- retries
This property is required. number - The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- status
This property is required. string - The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- suspended
This property is required. boolean - If suspended, no health checks are sent to the origin.
- tcp
Config This property is required. GetHealthchecks Result Tcp Config - Parameters specific to TCP health check.
- timeout
This property is required. number - The timeout (in seconds) before marking the health check as failed.
- type
This property is required. string - The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
- address
This property is required. str - The hostname or IP address of the origin server to run health checks on.
- check_
regions This property is required. Sequence[str] - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive_
fails This property is required. int - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive_
successes This property is required. int - The number of consecutive successes required from a health check before changing the health to healthy.
- created_
on This property is required. str - description
This property is required. str - A human-readable description of the health check.
- failure_
reason This property is required. str - The current failure reason if status is unhealthy.
- http_
config This property is required. GetHealthchecks Result Http Config - Parameters specific to an HTTP or HTTPS health check.
- id
This property is required. str - Identifier
- interval
This property is required. int - The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.
- modified_
on This property is required. str - name
This property is required. str - A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- retries
This property is required. int - The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- status
This property is required. str - The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- suspended
This property is required. bool - If suspended, no health checks are sent to the origin.
- tcp_
config This property is required. GetHealthchecks Result Tcp Config - Parameters specific to TCP health check.
- timeout
This property is required. int - The timeout (in seconds) before marking the health check as failed.
- type
This property is required. str - The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
- address
This property is required. String - The hostname or IP address of the origin server to run health checks on.
- check
Regions This property is required. List<String> - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive
Fails This property is required. Number - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive
Successes This property is required. Number - The number of consecutive successes required from a health check before changing the health to healthy.
- created
On This property is required. String - description
This property is required. String - A human-readable description of the health check.
- failure
Reason This property is required. String - The current failure reason if status is unhealthy.
- http
Config This property is required. Property Map - Parameters specific to an HTTP or HTTPS health check.
- id
This property is required. String - Identifier
- interval
This property is required. Number - The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.
- modified
On This property is required. String - name
This property is required. String - A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- retries
This property is required. Number - The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- status
This property is required. String - The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- suspended
This property is required. Boolean - If suspended, no health checks are sent to the origin.
- tcp
Config This property is required. Property Map - Parameters specific to TCP health check.
- timeout
This property is required. Number - The timeout (in seconds) before marking the health check as failed.
- type
This property is required. String - The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
GetHealthchecksResultHttpConfig
- Allow
Insecure This property is required. bool - Do not validate the certificate when the health check uses HTTPS.
- Expected
Body This property is required. 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.
- Expected
Codes This property is required. List<string> - The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.
- Follow
Redirects This property is required. bool - Follow redirects if the origin returns a 3xx status code.
- Header
This property is required. 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.
- Method
This property is required. string - The HTTP method to use for the health check. Available values: "GET", "HEAD".
- Path
This property is required. string - The endpoint path to health check against.
- Port
This property is required. int - Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
- Allow
Insecure This property is required. bool - Do not validate the certificate when the health check uses HTTPS.
- Expected
Body This property is required. 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.
- Expected
Codes This property is required. []string - The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.
- Follow
Redirects This property is required. bool - Follow redirects if the origin returns a 3xx status code.
- Header
This property is required. 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.
- Method
This property is required. string - The HTTP method to use for the health check. Available values: "GET", "HEAD".
- Path
This property is required. string - The endpoint path to health check against.
- Port
This property is required. int - Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
- allow
Insecure This property is required. Boolean - Do not validate the certificate when the health check uses HTTPS.
- expected
Body This property is required. 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.
- expected
Codes This property is required. List<String> - The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.
- follow
Redirects This property is required. Boolean - Follow redirects if the origin returns a 3xx status code.
- header
This property is required. 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.
- method
This property is required. String - The HTTP method to use for the health check. Available values: "GET", "HEAD".
- path
This property is required. String - The endpoint path to health check against.
- port
This property is required. Integer - Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
- allow
Insecure This property is required. boolean - Do not validate the certificate when the health check uses HTTPS.
- expected
Body This property is required. 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.
- expected
Codes This property is required. string[] - The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.
- follow
Redirects This property is required. boolean - Follow redirects if the origin returns a 3xx status code.
- header
This property is required. {[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.
- method
This property is required. string - The HTTP method to use for the health check. Available values: "GET", "HEAD".
- path
This property is required. string - The endpoint path to health check against.
- port
This property is required. number - Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
- allow_
insecure This property is required. bool - Do not validate the certificate when the health check uses HTTPS.
- expected_
body This property is required. 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.
- expected_
codes This property is required. Sequence[str] - The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.
- follow_
redirects This property is required. bool - Follow redirects if the origin returns a 3xx status code.
- header
This property is required. 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.
- method
This property is required. str - The HTTP method to use for the health check. Available values: "GET", "HEAD".
- path
This property is required. str - The endpoint path to health check against.
- port
This property is required. int - Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
- allow
Insecure This property is required. Boolean - Do not validate the certificate when the health check uses HTTPS.
- expected
Body This property is required. 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.
- expected
Codes This property is required. List<String> - The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.
- follow
Redirects This property is required. Boolean - Follow redirects if the origin returns a 3xx status code.
- header
This property is required. 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.
- method
This property is required. String - The HTTP method to use for the health check. Available values: "GET", "HEAD".
- path
This property is required. String - The endpoint path to health check against.
- port
This property is required. Number - Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
GetHealthchecksResultTcpConfig
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.