cloudflare.Healthcheck
Explore with Pulumi AI
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
exampleHealthcheck:
type: cloudflare:Healthcheck
name: example_healthcheck
properties:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
address: www.example.com
name: server-1
checkRegions:
- WEU
- ENAM
consecutiveFails: 0
consecutiveSuccesses: 0
description: Health check for www.example.com
httpConfig:
allow_insecure: true
expected_body: success
expected_codes:
- 2xx
- '302'
follow_redirects: true
header:
host:
- example.com
x-App-ID:
- abc123
method: GET
path: /health
port: 0
interval: 0
retries: 0
suspended: true
tcpConfig:
method: connection_established
port: 0
timeout: 0
type: HTTPS
Create Healthcheck Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Healthcheck(name: string, args: HealthcheckArgs, opts?: CustomResourceOptions);
@overload
def Healthcheck(resource_name: str,
args: HealthcheckArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Healthcheck(resource_name: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
zone_id: Optional[str] = None,
name: Optional[str] = None,
interval: Optional[int] = None,
description: Optional[str] = None,
http_config: Optional[HealthcheckHttpConfigArgs] = None,
consecutive_successes: Optional[int] = None,
consecutive_fails: Optional[int] = None,
retries: Optional[int] = None,
suspended: Optional[bool] = None,
tcp_config: Optional[HealthcheckTcpConfigArgs] = None,
timeout: Optional[int] = None,
type: Optional[str] = None,
check_regions: Optional[Sequence[str]] = None)
func NewHealthcheck(ctx *Context, name string, args HealthcheckArgs, opts ...ResourceOption) (*Healthcheck, error)
public Healthcheck(string name, HealthcheckArgs args, CustomResourceOptions? opts = null)
public Healthcheck(String name, HealthcheckArgs args)
public Healthcheck(String name, HealthcheckArgs args, CustomResourceOptions options)
type: cloudflare:Healthcheck
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 HealthcheckArgs
- 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 HealthcheckArgs
- 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 HealthcheckArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HealthcheckArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HealthcheckArgs
- 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 healthcheckResource = new Cloudflare.Healthcheck("healthcheckResource", new()
{
Address = "string",
ZoneId = "string",
Name = "string",
Interval = 0,
Description = "string",
HttpConfig = new Cloudflare.Inputs.HealthcheckHttpConfigArgs
{
AllowInsecure = false,
ExpectedBody = "string",
ExpectedCodes = new[]
{
"string",
},
FollowRedirects = false,
Header =
{
{ "string", new[]
{
"string",
} },
},
Method = "string",
Path = "string",
Port = 0,
},
ConsecutiveSuccesses = 0,
ConsecutiveFails = 0,
Retries = 0,
Suspended = false,
TcpConfig = new Cloudflare.Inputs.HealthcheckTcpConfigArgs
{
Method = "string",
Port = 0,
},
Timeout = 0,
Type = "string",
CheckRegions = new[]
{
"string",
},
});
example, err := cloudflare.NewHealthcheck(ctx, "healthcheckResource", &cloudflare.HealthcheckArgs{
Address: pulumi.String("string"),
ZoneId: pulumi.String("string"),
Name: pulumi.String("string"),
Interval: pulumi.Int(0),
Description: pulumi.String("string"),
HttpConfig: &cloudflare.HealthcheckHttpConfigArgs{
AllowInsecure: pulumi.Bool(false),
ExpectedBody: pulumi.String("string"),
ExpectedCodes: pulumi.StringArray{
pulumi.String("string"),
},
FollowRedirects: pulumi.Bool(false),
Header: pulumi.StringArrayMap{
"string": pulumi.StringArray{
pulumi.String("string"),
},
},
Method: pulumi.String("string"),
Path: pulumi.String("string"),
Port: pulumi.Int(0),
},
ConsecutiveSuccesses: pulumi.Int(0),
ConsecutiveFails: pulumi.Int(0),
Retries: pulumi.Int(0),
Suspended: pulumi.Bool(false),
TcpConfig: &cloudflare.HealthcheckTcpConfigArgs{
Method: pulumi.String("string"),
Port: pulumi.Int(0),
},
Timeout: pulumi.Int(0),
Type: pulumi.String("string"),
CheckRegions: pulumi.StringArray{
pulumi.String("string"),
},
})
var healthcheckResource = new Healthcheck("healthcheckResource", HealthcheckArgs.builder()
.address("string")
.zoneId("string")
.name("string")
.interval(0)
.description("string")
.httpConfig(HealthcheckHttpConfigArgs.builder()
.allowInsecure(false)
.expectedBody("string")
.expectedCodes("string")
.followRedirects(false)
.header(Map.of("string", "string"))
.method("string")
.path("string")
.port(0)
.build())
.consecutiveSuccesses(0)
.consecutiveFails(0)
.retries(0)
.suspended(false)
.tcpConfig(HealthcheckTcpConfigArgs.builder()
.method("string")
.port(0)
.build())
.timeout(0)
.type("string")
.checkRegions("string")
.build());
healthcheck_resource = cloudflare.Healthcheck("healthcheckResource",
address="string",
zone_id="string",
name="string",
interval=0,
description="string",
http_config={
"allow_insecure": False,
"expected_body": "string",
"expected_codes": ["string"],
"follow_redirects": False,
"header": {
"string": ["string"],
},
"method": "string",
"path": "string",
"port": 0,
},
consecutive_successes=0,
consecutive_fails=0,
retries=0,
suspended=False,
tcp_config={
"method": "string",
"port": 0,
},
timeout=0,
type="string",
check_regions=["string"])
const healthcheckResource = new cloudflare.Healthcheck("healthcheckResource", {
address: "string",
zoneId: "string",
name: "string",
interval: 0,
description: "string",
httpConfig: {
allowInsecure: false,
expectedBody: "string",
expectedCodes: ["string"],
followRedirects: false,
header: {
string: ["string"],
},
method: "string",
path: "string",
port: 0,
},
consecutiveSuccesses: 0,
consecutiveFails: 0,
retries: 0,
suspended: false,
tcpConfig: {
method: "string",
port: 0,
},
timeout: 0,
type: "string",
checkRegions: ["string"],
});
type: cloudflare:Healthcheck
properties:
address: string
checkRegions:
- string
consecutiveFails: 0
consecutiveSuccesses: 0
description: string
httpConfig:
allowInsecure: false
expectedBody: string
expectedCodes:
- string
followRedirects: false
header:
string:
- string
method: string
path: string
port: 0
interval: 0
name: string
retries: 0
suspended: false
tcpConfig:
method: string
port: 0
timeout: 0
type: string
zoneId: string
Healthcheck 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 Healthcheck resource accepts the following input properties:
- Address string
- The hostname or IP address of the origin server to run health checks on.
- Name string
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- Zone
Id string - Identifier
- Check
Regions List<string> - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- Consecutive
Fails int - The number of consecutive fails required from a health check before changing the health to unhealthy.
- Consecutive
Successes int - The number of consecutive successes required from a health check before changing the health to healthy.
- Description string
- A human-readable description of the health check.
- Http
Config HealthcheckHttp Config - Parameters specific to an HTTP or HTTPS health check.
- Interval 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.
- Retries int
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- Suspended bool
- If suspended, no health checks are sent to the origin.
- Tcp
Config HealthcheckTcp Config - Parameters specific to TCP health check.
- 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' and 'TCP'.
- Address string
- The hostname or IP address of the origin server to run health checks on.
- Name string
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- Zone
Id string - Identifier
- Check
Regions []string - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- Consecutive
Fails int - The number of consecutive fails required from a health check before changing the health to unhealthy.
- Consecutive
Successes int - The number of consecutive successes required from a health check before changing the health to healthy.
- Description string
- A human-readable description of the health check.
- Http
Config HealthcheckHttp Config Args - Parameters specific to an HTTP or HTTPS health check.
- Interval 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.
- Retries int
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- Suspended bool
- If suspended, no health checks are sent to the origin.
- Tcp
Config HealthcheckTcp Config Args - Parameters specific to TCP health check.
- 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' and 'TCP'.
- address String
- The hostname or IP address of the origin server to run health checks on.
- name String
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- zone
Id String - Identifier
- check
Regions List<String> - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive
Fails Integer - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive
Successes Integer - The number of consecutive successes required from a health check before changing the health to healthy.
- description String
- A human-readable description of the health check.
- http
Config HealthcheckHttp Config - Parameters specific to an HTTP or HTTPS health check.
- interval 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.
- retries Integer
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- suspended Boolean
- If suspended, no health checks are sent to the origin.
- tcp
Config HealthcheckTcp Config - Parameters specific to TCP health check.
- 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' and 'TCP'.
- address string
- The hostname or IP address of the origin server to run health checks on.
- name string
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- zone
Id string - Identifier
- check
Regions string[] - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive
Fails number - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive
Successes number - The number of consecutive successes required from a health check before changing the health to healthy.
- description string
- A human-readable description of the health check.
- http
Config HealthcheckHttp Config - Parameters specific to an HTTP or HTTPS health check.
- interval 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.
- retries number
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- suspended boolean
- If suspended, no health checks are sent to the origin.
- tcp
Config HealthcheckTcp Config - Parameters specific to TCP health check.
- 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' and 'TCP'.
- address str
- The hostname or IP address of the origin server to run health checks on.
- name str
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- zone_
id str - Identifier
- check_
regions Sequence[str] - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive_
fails int - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive_
successes int - The number of consecutive successes required from a health check before changing the health to healthy.
- description str
- A human-readable description of the health check.
- http_
config HealthcheckHttp Config Args - Parameters specific to an HTTP or HTTPS health check.
- interval 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.
- retries int
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- suspended bool
- If suspended, no health checks are sent to the origin.
- tcp_
config HealthcheckTcp Config Args - Parameters specific to TCP health check.
- 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' and 'TCP'.
- address String
- The hostname or IP address of the origin server to run health checks on.
- name String
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- zone
Id String - Identifier
- check
Regions List<String> - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive
Fails Number - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive
Successes Number - The number of consecutive successes required from a health check before changing the health to healthy.
- description String
- A human-readable description of the health check.
- http
Config Property Map - Parameters specific to an HTTP or HTTPS health check.
- interval 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.
- retries Number
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- suspended Boolean
- If suspended, no health checks are sent to the origin.
- tcp
Config Property Map - Parameters specific to TCP health check.
- 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' and 'TCP'.
Outputs
All input properties are implicitly available as output properties. Additionally, the Healthcheck resource produces the following output properties:
- Created
On string - Failure
Reason string - The current failure reason if status is unhealthy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - Status string
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- Created
On string - Failure
Reason string - The current failure reason if status is unhealthy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - Status string
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- created
On String - failure
Reason String - The current failure reason if status is unhealthy.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - status String
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- created
On string - failure
Reason string - The current failure reason if status is unhealthy.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
On string - status string
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- created_
on str - failure_
reason str - The current failure reason if status is unhealthy.
- id str
- The provider-assigned unique ID for this managed resource.
- modified_
on str - status str
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- created
On String - failure
Reason String - The current failure reason if status is unhealthy.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - status String
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
Look up Existing Healthcheck Resource
Get an existing Healthcheck 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?: HealthcheckState, opts?: CustomResourceOptions): Healthcheck
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
check_regions: Optional[Sequence[str]] = None,
consecutive_fails: Optional[int] = None,
consecutive_successes: Optional[int] = None,
created_on: Optional[str] = None,
description: Optional[str] = None,
failure_reason: Optional[str] = None,
http_config: Optional[HealthcheckHttpConfigArgs] = None,
interval: Optional[int] = None,
modified_on: Optional[str] = None,
name: Optional[str] = None,
retries: Optional[int] = None,
status: Optional[str] = None,
suspended: Optional[bool] = None,
tcp_config: Optional[HealthcheckTcpConfigArgs] = None,
timeout: Optional[int] = None,
type: Optional[str] = None,
zone_id: Optional[str] = None) -> Healthcheck
func GetHealthcheck(ctx *Context, name string, id IDInput, state *HealthcheckState, opts ...ResourceOption) (*Healthcheck, error)
public static Healthcheck Get(string name, Input<string> id, HealthcheckState? state, CustomResourceOptions? opts = null)
public static Healthcheck get(String name, Output<String> id, HealthcheckState state, CustomResourceOptions options)
resources: _: type: cloudflare:Healthcheck get: id: ${id}
- 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.
- Address string
- The hostname or IP address of the origin server to run health checks on.
- Check
Regions List<string> - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- Consecutive
Fails int - The number of consecutive fails required from a health check before changing the health to unhealthy.
- Consecutive
Successes int - The number of consecutive successes required from a health check before changing the health to healthy.
- Created
On string - Description string
- A human-readable description of the health check.
- Failure
Reason string - The current failure reason if status is unhealthy.
- Http
Config HealthcheckHttp Config - Parameters specific to an HTTP or HTTPS health check.
- Interval 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 string - Name string
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- Retries int
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- Status string
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- Suspended bool
- If suspended, no health checks are sent to the origin.
- Tcp
Config HealthcheckTcp Config - Parameters specific to TCP health check.
- 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' and 'TCP'.
- Zone
Id string - Identifier
- Address string
- The hostname or IP address of the origin server to run health checks on.
- Check
Regions []string - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- Consecutive
Fails int - The number of consecutive fails required from a health check before changing the health to unhealthy.
- Consecutive
Successes int - The number of consecutive successes required from a health check before changing the health to healthy.
- Created
On string - Description string
- A human-readable description of the health check.
- Failure
Reason string - The current failure reason if status is unhealthy.
- Http
Config HealthcheckHttp Config Args - Parameters specific to an HTTP or HTTPS health check.
- Interval 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 string - Name string
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- Retries int
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- Status string
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- Suspended bool
- If suspended, no health checks are sent to the origin.
- Tcp
Config HealthcheckTcp Config Args - Parameters specific to TCP health check.
- 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' and 'TCP'.
- Zone
Id string - Identifier
- address String
- The hostname or IP address of the origin server to run health checks on.
- check
Regions List<String> - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive
Fails Integer - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive
Successes Integer - The number of consecutive successes required from a health check before changing the health to healthy.
- created
On String - description String
- A human-readable description of the health check.
- failure
Reason String - The current failure reason if status is unhealthy.
- http
Config HealthcheckHttp Config - Parameters specific to an HTTP or HTTPS health check.
- interval 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 String - name String
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- retries Integer
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- status String
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- suspended Boolean
- If suspended, no health checks are sent to the origin.
- tcp
Config HealthcheckTcp Config - Parameters specific to TCP health check.
- 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' and 'TCP'.
- zone
Id String - Identifier
- address string
- The hostname or IP address of the origin server to run health checks on.
- check
Regions string[] - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive
Fails number - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive
Successes number - The number of consecutive successes required from a health check before changing the health to healthy.
- created
On string - description string
- A human-readable description of the health check.
- failure
Reason string - The current failure reason if status is unhealthy.
- http
Config HealthcheckHttp Config - Parameters specific to an HTTP or HTTPS health check.
- interval 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 string - name string
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- retries number
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- status string
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- suspended boolean
- If suspended, no health checks are sent to the origin.
- tcp
Config HealthcheckTcp Config - Parameters specific to TCP health check.
- 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' and 'TCP'.
- zone
Id string - Identifier
- address str
- The hostname or IP address of the origin server to run health checks on.
- check_
regions Sequence[str] - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive_
fails int - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive_
successes int - The number of consecutive successes required from a health check before changing the health to healthy.
- created_
on str - description str
- A human-readable description of the health check.
- failure_
reason str - The current failure reason if status is unhealthy.
- http_
config HealthcheckHttp Config Args - Parameters specific to an HTTP or HTTPS health check.
- interval 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 str - name str
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- retries int
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- status str
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- suspended bool
- If suspended, no health checks are sent to the origin.
- tcp_
config HealthcheckTcp Config Args - Parameters specific to TCP health check.
- 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' and 'TCP'.
- zone_
id str - Identifier
- address String
- The hostname or IP address of the origin server to run health checks on.
- check
Regions List<String> - A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
- consecutive
Fails Number - The number of consecutive fails required from a health check before changing the health to unhealthy.
- consecutive
Successes Number - The number of consecutive successes required from a health check before changing the health to healthy.
- created
On String - description String
- A human-readable description of the health check.
- failure
Reason String - The current failure reason if status is unhealthy.
- http
Config Property Map - Parameters specific to an HTTP or HTTPS health check.
- interval 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 String - name String
- A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- retries Number
- The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
- status String
- The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
- suspended Boolean
- If suspended, no health checks are sent to the origin.
- tcp
Config Property Map - Parameters specific to TCP health check.
- 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' and 'TCP'.
- zone
Id String - Identifier
Supporting Types
HealthcheckHttpConfig, HealthcheckHttpConfigArgs
- Allow
Insecure bool - Do not validate the certificate when the health check uses HTTPS.
- Expected
Body 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 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 bool - Follow redirects if the origin returns a 3xx status code.
- Header
Dictionary<string, Immutable
Array<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 string
- The HTTP method to use for the health check. Available values: "GET", "HEAD".
- Path string
- The endpoint path to health check against.
- Port 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 bool - Do not validate the certificate when the health check uses HTTPS.
- Expected
Body 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 []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 bool - Follow redirects if the origin returns a 3xx status code.
- 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.
- Method string
- The HTTP method to use for the health check. Available values: "GET", "HEAD".
- Path string
- The endpoint path to health check against.
- Port 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 Boolean - Do not validate the certificate when the health check uses HTTPS.
- expected
Body 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 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 Boolean - Follow redirects if the origin returns a 3xx status code.
- 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.
- method String
- The HTTP method to use for the health check. Available values: "GET", "HEAD".
- path String
- The endpoint path to health check against.
- port 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 boolean - Do not validate the certificate when the health check uses HTTPS.
- expected
Body 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 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 boolean - Follow redirects if the origin returns a 3xx status code.
- 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.
- method string
- The HTTP method to use for the health check. Available values: "GET", "HEAD".
- path string
- The endpoint path to health check against.
- port 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 bool - Do not validate the certificate when the health check uses HTTPS.
- 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.
- expected_
codes 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 bool - Follow redirects if the origin returns a 3xx status code.
- 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.
- method str
- The HTTP method to use for the health check. Available values: "GET", "HEAD".
- path str
- The endpoint path to health check against.
- port 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 Boolean - Do not validate the certificate when the health check uses HTTPS.
- expected
Body 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 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 Boolean - Follow redirects if the origin returns a 3xx status code.
- 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.
- method String
- The HTTP method to use for the health check. Available values: "GET", "HEAD".
- path String
- The endpoint path to health check against.
- port Number
- Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
HealthcheckTcpConfig, HealthcheckTcpConfigArgs
Import
$ pulumi import cloudflare:index/healthcheck:Healthcheck example '<zone_id>/<healthcheck_id>'
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.