All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.route53.kotlin.HealthCheckArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.route53.kotlin

import com.pulumi.aws.route53.HealthCheckArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides a Route53 health check.
 * ## Example Usage
 * ### Connectivity and HTTP Status Code Check
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.route53.HealthCheck("example", {
 *     fqdn: "example.com",
 *     port: 80,
 *     type: "HTTP",
 *     resourcePath: "/",
 *     failureThreshold: 5,
 *     requestInterval: 30,
 *     tags: {
 *         Name: "tf-test-health-check",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.route53.HealthCheck("example",
 *     fqdn="example.com",
 *     port=80,
 *     type="HTTP",
 *     resource_path="/",
 *     failure_threshold=5,
 *     request_interval=30,
 *     tags={
 *         "Name": "tf-test-health-check",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Route53.HealthCheck("example", new()
 *     {
 *         Fqdn = "example.com",
 *         Port = 80,
 *         Type = "HTTP",
 *         ResourcePath = "/",
 *         FailureThreshold = 5,
 *         RequestInterval = 30,
 *         Tags =
 *         {
 *             { "Name", "tf-test-health-check" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := route53.NewHealthCheck(ctx, "example", &route53.HealthCheckArgs{
 * 			Fqdn:             pulumi.String("example.com"),
 * 			Port:             pulumi.Int(80),
 * 			Type:             pulumi.String("HTTP"),
 * 			ResourcePath:     pulumi.String("/"),
 * 			FailureThreshold: pulumi.Int(5),
 * 			RequestInterval:  pulumi.Int(30),
 * 			Tags: pulumi.StringMap{
 * 				"Name": pulumi.String("tf-test-health-check"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.route53.HealthCheck;
 * import com.pulumi.aws.route53.HealthCheckArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new HealthCheck("example", HealthCheckArgs.builder()
 *             .fqdn("example.com")
 *             .port(80)
 *             .type("HTTP")
 *             .resourcePath("/")
 *             .failureThreshold("5")
 *             .requestInterval("30")
 *             .tags(Map.of("Name", "tf-test-health-check"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:route53:HealthCheck
 *     properties:
 *       fqdn: example.com
 *       port: 80
 *       type: HTTP
 *       resourcePath: /
 *       failureThreshold: '5'
 *       requestInterval: '30'
 *       tags:
 *         Name: tf-test-health-check
 * ```
 * 
 * ### Connectivity and String Matching Check
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.route53.HealthCheck("example", {
 *     failureThreshold: 5,
 *     fqdn: "example.com",
 *     port: 443,
 *     requestInterval: 30,
 *     resourcePath: "/",
 *     searchString: "example",
 *     type: "HTTPS_STR_MATCH",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.route53.HealthCheck("example",
 *     failure_threshold=5,
 *     fqdn="example.com",
 *     port=443,
 *     request_interval=30,
 *     resource_path="/",
 *     search_string="example",
 *     type="HTTPS_STR_MATCH")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Route53.HealthCheck("example", new()
 *     {
 *         FailureThreshold = 5,
 *         Fqdn = "example.com",
 *         Port = 443,
 *         RequestInterval = 30,
 *         ResourcePath = "/",
 *         SearchString = "example",
 *         Type = "HTTPS_STR_MATCH",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := route53.NewHealthCheck(ctx, "example", &route53.HealthCheckArgs{
 * 			FailureThreshold: pulumi.Int(5),
 * 			Fqdn:             pulumi.String("example.com"),
 * 			Port:             pulumi.Int(443),
 * 			RequestInterval:  pulumi.Int(30),
 * 			ResourcePath:     pulumi.String("/"),
 * 			SearchString:     pulumi.String("example"),
 * 			Type:             pulumi.String("HTTPS_STR_MATCH"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.route53.HealthCheck;
 * import com.pulumi.aws.route53.HealthCheckArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new HealthCheck("example", HealthCheckArgs.builder()
 *             .failureThreshold("5")
 *             .fqdn("example.com")
 *             .port(443)
 *             .requestInterval("30")
 *             .resourcePath("/")
 *             .searchString("example")
 *             .type("HTTPS_STR_MATCH")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:route53:HealthCheck
 *     properties:
 *       failureThreshold: '5'
 *       fqdn: example.com
 *       port: 443
 *       requestInterval: '30'
 *       resourcePath: /
 *       searchString: example
 *       type: HTTPS_STR_MATCH
 * ```
 * 
 * ### Aggregate Check
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const parent = new aws.route53.HealthCheck("parent", {
 *     type: "CALCULATED",
 *     childHealthThreshold: 1,
 *     childHealthchecks: [child.id],
 *     tags: {
 *         Name: "tf-test-calculated-health-check",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * parent = aws.route53.HealthCheck("parent",
 *     type="CALCULATED",
 *     child_health_threshold=1,
 *     child_healthchecks=[child["id"]],
 *     tags={
 *         "Name": "tf-test-calculated-health-check",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var parent = new Aws.Route53.HealthCheck("parent", new()
 *     {
 *         Type = "CALCULATED",
 *         ChildHealthThreshold = 1,
 *         ChildHealthchecks = new[]
 *         {
 *             child.Id,
 *         },
 *         Tags =
 *         {
 *             { "Name", "tf-test-calculated-health-check" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := route53.NewHealthCheck(ctx, "parent", &route53.HealthCheckArgs{
 * 			Type:                 pulumi.String("CALCULATED"),
 * 			ChildHealthThreshold: pulumi.Int(1),
 * 			ChildHealthchecks: pulumi.StringArray{
 * 				child.Id,
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"Name": pulumi.String("tf-test-calculated-health-check"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.route53.HealthCheck;
 * import com.pulumi.aws.route53.HealthCheckArgs;
 * 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 parent = new HealthCheck("parent", HealthCheckArgs.builder()
 *             .type("CALCULATED")
 *             .childHealthThreshold(1)
 *             .childHealthchecks(child.id())
 *             .tags(Map.of("Name", "tf-test-calculated-health-check"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   parent:
 *     type: aws:route53:HealthCheck
 *     properties:
 *       type: CALCULATED
 *       childHealthThreshold: 1
 *       childHealthchecks:
 *         - ${child.id}
 *       tags:
 *         Name: tf-test-calculated-health-check
 * ```
 * 
 * ### CloudWatch Alarm Check
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const foobar = new aws.cloudwatch.MetricAlarm("foobar", {
 *     name: "test-foobar5",
 *     comparisonOperator: "GreaterThanOrEqualToThreshold",
 *     evaluationPeriods: 2,
 *     metricName: "CPUUtilization",
 *     namespace: "AWS/EC2",
 *     period: 120,
 *     statistic: "Average",
 *     threshold: 80,
 *     alarmDescription: "This metric monitors ec2 cpu utilization",
 * });
 * const foo = new aws.route53.HealthCheck("foo", {
 *     type: "CLOUDWATCH_METRIC",
 *     cloudwatchAlarmName: foobar.name,
 *     cloudwatchAlarmRegion: "us-west-2",
 *     insufficientDataHealthStatus: "Healthy",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * foobar = aws.cloudwatch.MetricAlarm("foobar",
 *     name="test-foobar5",
 *     comparison_operator="GreaterThanOrEqualToThreshold",
 *     evaluation_periods=2,
 *     metric_name="CPUUtilization",
 *     namespace="AWS/EC2",
 *     period=120,
 *     statistic="Average",
 *     threshold=80,
 *     alarm_description="This metric monitors ec2 cpu utilization")
 * foo = aws.route53.HealthCheck("foo",
 *     type="CLOUDWATCH_METRIC",
 *     cloudwatch_alarm_name=foobar.name,
 *     cloudwatch_alarm_region="us-west-2",
 *     insufficient_data_health_status="Healthy")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foobar = new Aws.CloudWatch.MetricAlarm("foobar", new()
 *     {
 *         Name = "test-foobar5",
 *         ComparisonOperator = "GreaterThanOrEqualToThreshold",
 *         EvaluationPeriods = 2,
 *         MetricName = "CPUUtilization",
 *         Namespace = "AWS/EC2",
 *         Period = 120,
 *         Statistic = "Average",
 *         Threshold = 80,
 *         AlarmDescription = "This metric monitors ec2 cpu utilization",
 *     });
 *     var foo = new Aws.Route53.HealthCheck("foo", new()
 *     {
 *         Type = "CLOUDWATCH_METRIC",
 *         CloudwatchAlarmName = foobar.Name,
 *         CloudwatchAlarmRegion = "us-west-2",
 *         InsufficientDataHealthStatus = "Healthy",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		foobar, err := cloudwatch.NewMetricAlarm(ctx, "foobar", &cloudwatch.MetricAlarmArgs{
 * 			Name:               pulumi.String("test-foobar5"),
 * 			ComparisonOperator: pulumi.String("GreaterThanOrEqualToThreshold"),
 * 			EvaluationPeriods:  pulumi.Int(2),
 * 			MetricName:         pulumi.String("CPUUtilization"),
 * 			Namespace:          pulumi.String("AWS/EC2"),
 * 			Period:             pulumi.Int(120),
 * 			Statistic:          pulumi.String("Average"),
 * 			Threshold:          pulumi.Float64(80),
 * 			AlarmDescription:   pulumi.String("This metric monitors ec2 cpu utilization"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = route53.NewHealthCheck(ctx, "foo", &route53.HealthCheckArgs{
 * 			Type:                         pulumi.String("CLOUDWATCH_METRIC"),
 * 			CloudwatchAlarmName:          foobar.Name,
 * 			CloudwatchAlarmRegion:        pulumi.String("us-west-2"),
 * 			InsufficientDataHealthStatus: pulumi.String("Healthy"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.cloudwatch.MetricAlarm;
 * import com.pulumi.aws.cloudwatch.MetricAlarmArgs;
 * import com.pulumi.aws.route53.HealthCheck;
 * import com.pulumi.aws.route53.HealthCheckArgs;
 * 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 foobar = new MetricAlarm("foobar", MetricAlarmArgs.builder()
 *             .name("test-foobar5")
 *             .comparisonOperator("GreaterThanOrEqualToThreshold")
 *             .evaluationPeriods("2")
 *             .metricName("CPUUtilization")
 *             .namespace("AWS/EC2")
 *             .period("120")
 *             .statistic("Average")
 *             .threshold("80")
 *             .alarmDescription("This metric monitors ec2 cpu utilization")
 *             .build());
 *         var foo = new HealthCheck("foo", HealthCheckArgs.builder()
 *             .type("CLOUDWATCH_METRIC")
 *             .cloudwatchAlarmName(foobar.name())
 *             .cloudwatchAlarmRegion("us-west-2")
 *             .insufficientDataHealthStatus("Healthy")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   foobar:
 *     type: aws:cloudwatch:MetricAlarm
 *     properties:
 *       name: test-foobar5
 *       comparisonOperator: GreaterThanOrEqualToThreshold
 *       evaluationPeriods: '2'
 *       metricName: CPUUtilization
 *       namespace: AWS/EC2
 *       period: '120'
 *       statistic: Average
 *       threshold: '80'
 *       alarmDescription: This metric monitors ec2 cpu utilization
 *   foo:
 *     type: aws:route53:HealthCheck
 *     properties:
 *       type: CLOUDWATCH_METRIC
 *       cloudwatchAlarmName: ${foobar.name}
 *       cloudwatchAlarmRegion: us-west-2
 *       insufficientDataHealthStatus: Healthy
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Route53 Health Checks using the health check `id`. For example:
 * ```sh
 * $ pulumi import aws:route53/healthCheck:HealthCheck http_check abcdef11-2222-3333-4444-555555fedcba
 * ```
 * @property childHealthThreshold The minimum number of child health checks that must be healthy for Route 53 to consider the parent health check to be healthy. Valid values are integers between 0 and 256, inclusive
 * @property childHealthchecks For a specified parent health check, a list of HealthCheckId values for the associated child health checks.
 * @property cloudwatchAlarmName The name of the CloudWatch alarm.
 * @property cloudwatchAlarmRegion The CloudWatchRegion that the CloudWatch alarm was created in.
 * @property disabled A boolean value that stops Route 53 from performing health checks. When set to true, Route 53 will do the following depending on the type of health check:
 * * For health checks that check the health of endpoints, Route5 53 stops submitting requests to your application, server, or other resource.
 * * For calculated health checks, Route 53 stops aggregating the status of the referenced health checks.
 * * For health checks that monitor CloudWatch alarms, Route 53 stops monitoring the corresponding CloudWatch metrics.
 * > **Note:** After you disable a health check, Route 53 considers the status of the health check to always be healthy. If you configured DNS failover, Route 53 continues to route traffic to the corresponding resources. If you want to stop routing traffic to a resource, change the value of `invert_healthcheck`.
 * @property enableSni A boolean value that indicates whether Route53 should send the `fqdn` to the endpoint when performing the health check. This defaults to AWS' defaults: when the `type` is "HTTPS" `enable_sni` defaults to `true`, when `type` is anything else `enable_sni` defaults to `false`.
 * @property failureThreshold The number of consecutive health checks that an endpoint must pass or fail.
 * @property fqdn The fully qualified domain name of the endpoint to be checked. If a value is set for `ip_address`, the value set for `fqdn` will be passed in the `Host` header.
 * @property insufficientDataHealthStatus The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`.
 * @property invertHealthcheck A boolean value that indicates whether the status of health check should be inverted. For example, if a health check is healthy but Inverted is True , then Route 53 considers the health check to be unhealthy.
 * @property ipAddress The IP address of the endpoint to be checked.
 * @property measureLatency A Boolean value that indicates whether you want Route 53 to measure the latency between health checkers in multiple AWS regions and your endpoint and to display CloudWatch latency graphs in the Route 53 console.
 * @property port The port of the endpoint to be checked.
 * @property referenceName This is a reference name used in Caller Reference
 * (helpful for identifying single health_check set amongst others)
 * @property regions A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from.
 * @property requestInterval The number of seconds between the time that Amazon Route 53 gets a response from your endpoint and the time that it sends the next health-check request.
 * @property resourcePath The path that you want Amazon Route 53 to request when performing health checks.
 * @property routingControlArn The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is `RECOVERY_CONTROL`
 * @property searchString String searched in the first 5120 bytes of the response body for check to be considered healthy. Only valid with `HTTP_STR_MATCH` and `HTTPS_STR_MATCH`.
 * @property tags A map of tags to assign to the health check. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property type The protocol to use when performing health checks. Valid values are `HTTP`, `HTTPS`, `HTTP_STR_MATCH`, `HTTPS_STR_MATCH`, `TCP`, `CALCULATED`, `CLOUDWATCH_METRIC` and `RECOVERY_CONTROL`.
 */
public data class HealthCheckArgs(
    public val childHealthThreshold: Output? = null,
    public val childHealthchecks: Output>? = null,
    public val cloudwatchAlarmName: Output? = null,
    public val cloudwatchAlarmRegion: Output? = null,
    public val disabled: Output? = null,
    public val enableSni: Output? = null,
    public val failureThreshold: Output? = null,
    public val fqdn: Output? = null,
    public val insufficientDataHealthStatus: Output? = null,
    public val invertHealthcheck: Output? = null,
    public val ipAddress: Output? = null,
    public val measureLatency: Output? = null,
    public val port: Output? = null,
    public val referenceName: Output? = null,
    public val regions: Output>? = null,
    public val requestInterval: Output? = null,
    public val resourcePath: Output? = null,
    public val routingControlArn: Output? = null,
    public val searchString: Output? = null,
    public val tags: Output>? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.route53.HealthCheckArgs =
        com.pulumi.aws.route53.HealthCheckArgs.builder()
            .childHealthThreshold(childHealthThreshold?.applyValue({ args0 -> args0 }))
            .childHealthchecks(childHealthchecks?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .cloudwatchAlarmName(cloudwatchAlarmName?.applyValue({ args0 -> args0 }))
            .cloudwatchAlarmRegion(cloudwatchAlarmRegion?.applyValue({ args0 -> args0 }))
            .disabled(disabled?.applyValue({ args0 -> args0 }))
            .enableSni(enableSni?.applyValue({ args0 -> args0 }))
            .failureThreshold(failureThreshold?.applyValue({ args0 -> args0 }))
            .fqdn(fqdn?.applyValue({ args0 -> args0 }))
            .insufficientDataHealthStatus(insufficientDataHealthStatus?.applyValue({ args0 -> args0 }))
            .invertHealthcheck(invertHealthcheck?.applyValue({ args0 -> args0 }))
            .ipAddress(ipAddress?.applyValue({ args0 -> args0 }))
            .measureLatency(measureLatency?.applyValue({ args0 -> args0 }))
            .port(port?.applyValue({ args0 -> args0 }))
            .referenceName(referenceName?.applyValue({ args0 -> args0 }))
            .regions(regions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .requestInterval(requestInterval?.applyValue({ args0 -> args0 }))
            .resourcePath(resourcePath?.applyValue({ args0 -> args0 }))
            .routingControlArn(routingControlArn?.applyValue({ args0 -> args0 }))
            .searchString(searchString?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HealthCheckArgs].
 */
@PulumiTagMarker
public class HealthCheckArgsBuilder internal constructor() {
    private var childHealthThreshold: Output? = null

    private var childHealthchecks: Output>? = null

    private var cloudwatchAlarmName: Output? = null

    private var cloudwatchAlarmRegion: Output? = null

    private var disabled: Output? = null

    private var enableSni: Output? = null

    private var failureThreshold: Output? = null

    private var fqdn: Output? = null

    private var insufficientDataHealthStatus: Output? = null

    private var invertHealthcheck: Output? = null

    private var ipAddress: Output? = null

    private var measureLatency: Output? = null

    private var port: Output? = null

    private var referenceName: Output? = null

    private var regions: Output>? = null

    private var requestInterval: Output? = null

    private var resourcePath: Output? = null

    private var routingControlArn: Output? = null

    private var searchString: Output? = null

    private var tags: Output>? = null

    private var type: Output? = null

    /**
     * @param value The minimum number of child health checks that must be healthy for Route 53 to consider the parent health check to be healthy. Valid values are integers between 0 and 256, inclusive
     */
    @JvmName("oejyhqyrdsbaqgxp")
    public suspend fun childHealthThreshold(`value`: Output) {
        this.childHealthThreshold = value
    }

    /**
     * @param value For a specified parent health check, a list of HealthCheckId values for the associated child health checks.
     */
    @JvmName("cjvoygnfjrplohnq")
    public suspend fun childHealthchecks(`value`: Output>) {
        this.childHealthchecks = value
    }

    @JvmName("jhiktcbhhsuakwfq")
    public suspend fun childHealthchecks(vararg values: Output) {
        this.childHealthchecks = Output.all(values.asList())
    }

    /**
     * @param values For a specified parent health check, a list of HealthCheckId values for the associated child health checks.
     */
    @JvmName("rmuuydcqfnuylbes")
    public suspend fun childHealthchecks(values: List>) {
        this.childHealthchecks = Output.all(values)
    }

    /**
     * @param value The name of the CloudWatch alarm.
     */
    @JvmName("krvblwusefcllcjh")
    public suspend fun cloudwatchAlarmName(`value`: Output) {
        this.cloudwatchAlarmName = value
    }

    /**
     * @param value The CloudWatchRegion that the CloudWatch alarm was created in.
     */
    @JvmName("diyvydwvayepjlsu")
    public suspend fun cloudwatchAlarmRegion(`value`: Output) {
        this.cloudwatchAlarmRegion = value
    }

    /**
     * @param value A boolean value that stops Route 53 from performing health checks. When set to true, Route 53 will do the following depending on the type of health check:
     * * For health checks that check the health of endpoints, Route5 53 stops submitting requests to your application, server, or other resource.
     * * For calculated health checks, Route 53 stops aggregating the status of the referenced health checks.
     * * For health checks that monitor CloudWatch alarms, Route 53 stops monitoring the corresponding CloudWatch metrics.
     * > **Note:** After you disable a health check, Route 53 considers the status of the health check to always be healthy. If you configured DNS failover, Route 53 continues to route traffic to the corresponding resources. If you want to stop routing traffic to a resource, change the value of `invert_healthcheck`.
     */
    @JvmName("qvjbdigbmpxpmlxi")
    public suspend fun disabled(`value`: Output) {
        this.disabled = value
    }

    /**
     * @param value A boolean value that indicates whether Route53 should send the `fqdn` to the endpoint when performing the health check. This defaults to AWS' defaults: when the `type` is "HTTPS" `enable_sni` defaults to `true`, when `type` is anything else `enable_sni` defaults to `false`.
     */
    @JvmName("ownnvwhfcqjweamt")
    public suspend fun enableSni(`value`: Output) {
        this.enableSni = value
    }

    /**
     * @param value The number of consecutive health checks that an endpoint must pass or fail.
     */
    @JvmName("okmxqbbksfjpsjth")
    public suspend fun failureThreshold(`value`: Output) {
        this.failureThreshold = value
    }

    /**
     * @param value The fully qualified domain name of the endpoint to be checked. If a value is set for `ip_address`, the value set for `fqdn` will be passed in the `Host` header.
     */
    @JvmName("torqkmeoewbvedhb")
    public suspend fun fqdn(`value`: Output) {
        this.fqdn = value
    }

    /**
     * @param value The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`.
     */
    @JvmName("lcwovtwnxwqnxcts")
    public suspend fun insufficientDataHealthStatus(`value`: Output) {
        this.insufficientDataHealthStatus = value
    }

    /**
     * @param value A boolean value that indicates whether the status of health check should be inverted. For example, if a health check is healthy but Inverted is True , then Route 53 considers the health check to be unhealthy.
     */
    @JvmName("xrprgvewqcvvsrne")
    public suspend fun invertHealthcheck(`value`: Output) {
        this.invertHealthcheck = value
    }

    /**
     * @param value The IP address of the endpoint to be checked.
     */
    @JvmName("qwhsuveisqiwievw")
    public suspend fun ipAddress(`value`: Output) {
        this.ipAddress = value
    }

    /**
     * @param value A Boolean value that indicates whether you want Route 53 to measure the latency between health checkers in multiple AWS regions and your endpoint and to display CloudWatch latency graphs in the Route 53 console.
     */
    @JvmName("diclfvtrmsgblvfr")
    public suspend fun measureLatency(`value`: Output) {
        this.measureLatency = value
    }

    /**
     * @param value The port of the endpoint to be checked.
     */
    @JvmName("xfnsqyyfawqtqiaq")
    public suspend fun port(`value`: Output) {
        this.port = value
    }

    /**
     * @param value This is a reference name used in Caller Reference
     * (helpful for identifying single health_check set amongst others)
     */
    @JvmName("cytycjfflnfxhngq")
    public suspend fun referenceName(`value`: Output) {
        this.referenceName = value
    }

    /**
     * @param value A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from.
     */
    @JvmName("tnhpcjjhxettrgew")
    public suspend fun regions(`value`: Output>) {
        this.regions = value
    }

    @JvmName("pijvwocmkessknxp")
    public suspend fun regions(vararg values: Output) {
        this.regions = Output.all(values.asList())
    }

    /**
     * @param values A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from.
     */
    @JvmName("gguycvpntwylkurj")
    public suspend fun regions(values: List>) {
        this.regions = Output.all(values)
    }

    /**
     * @param value The number of seconds between the time that Amazon Route 53 gets a response from your endpoint and the time that it sends the next health-check request.
     */
    @JvmName("toqqyxbeyffbqkku")
    public suspend fun requestInterval(`value`: Output) {
        this.requestInterval = value
    }

    /**
     * @param value The path that you want Amazon Route 53 to request when performing health checks.
     */
    @JvmName("yxkygsskjqfddoqp")
    public suspend fun resourcePath(`value`: Output) {
        this.resourcePath = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is `RECOVERY_CONTROL`
     */
    @JvmName("otvovghrjmtjeauw")
    public suspend fun routingControlArn(`value`: Output) {
        this.routingControlArn = value
    }

    /**
     * @param value String searched in the first 5120 bytes of the response body for check to be considered healthy. Only valid with `HTTP_STR_MATCH` and `HTTPS_STR_MATCH`.
     */
    @JvmName("fdcofvrxxgkwmmfp")
    public suspend fun searchString(`value`: Output) {
        this.searchString = value
    }

    /**
     * @param value A map of tags to assign to the health check. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("vypvmkbmntpusahf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The protocol to use when performing health checks. Valid values are `HTTP`, `HTTPS`, `HTTP_STR_MATCH`, `HTTPS_STR_MATCH`, `TCP`, `CALCULATED`, `CLOUDWATCH_METRIC` and `RECOVERY_CONTROL`.
     */
    @JvmName("joafvcpbulmesvpq")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The minimum number of child health checks that must be healthy for Route 53 to consider the parent health check to be healthy. Valid values are integers between 0 and 256, inclusive
     */
    @JvmName("syuqgkgwtlchpqyv")
    public suspend fun childHealthThreshold(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.childHealthThreshold = mapped
    }

    /**
     * @param value For a specified parent health check, a list of HealthCheckId values for the associated child health checks.
     */
    @JvmName("cunsdwpremtvjvoy")
    public suspend fun childHealthchecks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.childHealthchecks = mapped
    }

    /**
     * @param values For a specified parent health check, a list of HealthCheckId values for the associated child health checks.
     */
    @JvmName("prkhrkqqocnibddh")
    public suspend fun childHealthchecks(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.childHealthchecks = mapped
    }

    /**
     * @param value The name of the CloudWatch alarm.
     */
    @JvmName("npiprjgcdrcmwviv")
    public suspend fun cloudwatchAlarmName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloudwatchAlarmName = mapped
    }

    /**
     * @param value The CloudWatchRegion that the CloudWatch alarm was created in.
     */
    @JvmName("smvukycxfuarhtsr")
    public suspend fun cloudwatchAlarmRegion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloudwatchAlarmRegion = mapped
    }

    /**
     * @param value A boolean value that stops Route 53 from performing health checks. When set to true, Route 53 will do the following depending on the type of health check:
     * * For health checks that check the health of endpoints, Route5 53 stops submitting requests to your application, server, or other resource.
     * * For calculated health checks, Route 53 stops aggregating the status of the referenced health checks.
     * * For health checks that monitor CloudWatch alarms, Route 53 stops monitoring the corresponding CloudWatch metrics.
     * > **Note:** After you disable a health check, Route 53 considers the status of the health check to always be healthy. If you configured DNS failover, Route 53 continues to route traffic to the corresponding resources. If you want to stop routing traffic to a resource, change the value of `invert_healthcheck`.
     */
    @JvmName("pttjfokmquemrdia")
    public suspend fun disabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disabled = mapped
    }

    /**
     * @param value A boolean value that indicates whether Route53 should send the `fqdn` to the endpoint when performing the health check. This defaults to AWS' defaults: when the `type` is "HTTPS" `enable_sni` defaults to `true`, when `type` is anything else `enable_sni` defaults to `false`.
     */
    @JvmName("ewcgwwcihsphsypi")
    public suspend fun enableSni(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableSni = mapped
    }

    /**
     * @param value The number of consecutive health checks that an endpoint must pass or fail.
     */
    @JvmName("hxqyrhnomcqabdic")
    public suspend fun failureThreshold(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.failureThreshold = mapped
    }

    /**
     * @param value The fully qualified domain name of the endpoint to be checked. If a value is set for `ip_address`, the value set for `fqdn` will be passed in the `Host` header.
     */
    @JvmName("qrrctkscjjhwbiqq")
    public suspend fun fqdn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fqdn = mapped
    }

    /**
     * @param value The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`.
     */
    @JvmName("odxrxfsxvsgcnpby")
    public suspend fun insufficientDataHealthStatus(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.insufficientDataHealthStatus = mapped
    }

    /**
     * @param value A boolean value that indicates whether the status of health check should be inverted. For example, if a health check is healthy but Inverted is True , then Route 53 considers the health check to be unhealthy.
     */
    @JvmName("aaeiyfvgyvkkvfij")
    public suspend fun invertHealthcheck(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.invertHealthcheck = mapped
    }

    /**
     * @param value The IP address of the endpoint to be checked.
     */
    @JvmName("igreccaupromkpnl")
    public suspend fun ipAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipAddress = mapped
    }

    /**
     * @param value A Boolean value that indicates whether you want Route 53 to measure the latency between health checkers in multiple AWS regions and your endpoint and to display CloudWatch latency graphs in the Route 53 console.
     */
    @JvmName("pavvqcjyrobomdrx")
    public suspend fun measureLatency(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.measureLatency = mapped
    }

    /**
     * @param value The port of the endpoint to be checked.
     */
    @JvmName("hreyiwxtifsyyvwr")
    public suspend fun port(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.port = mapped
    }

    /**
     * @param value This is a reference name used in Caller Reference
     * (helpful for identifying single health_check set amongst others)
     */
    @JvmName("pelsuodkiknatsjc")
    public suspend fun referenceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.referenceName = mapped
    }

    /**
     * @param value A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from.
     */
    @JvmName("lbwjohmlgwkaxeso")
    public suspend fun regions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regions = mapped
    }

    /**
     * @param values A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from.
     */
    @JvmName("tnucsijccalrymte")
    public suspend fun regions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.regions = mapped
    }

    /**
     * @param value The number of seconds between the time that Amazon Route 53 gets a response from your endpoint and the time that it sends the next health-check request.
     */
    @JvmName("iowawujnmqepdyfx")
    public suspend fun requestInterval(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestInterval = mapped
    }

    /**
     * @param value The path that you want Amazon Route 53 to request when performing health checks.
     */
    @JvmName("yinhxlgsabahyybg")
    public suspend fun resourcePath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourcePath = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is `RECOVERY_CONTROL`
     */
    @JvmName("yyhwqirkyqhdpmsp")
    public suspend fun routingControlArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routingControlArn = mapped
    }

    /**
     * @param value String searched in the first 5120 bytes of the response body for check to be considered healthy. Only valid with `HTTP_STR_MATCH` and `HTTPS_STR_MATCH`.
     */
    @JvmName("eujajtrubmecxidr")
    public suspend fun searchString(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.searchString = mapped
    }

    /**
     * @param value A map of tags to assign to the health check. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("myyymtekeikppdpa")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A map of tags to assign to the health check. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("jbkdecmimcqfndhv")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The protocol to use when performing health checks. Valid values are `HTTP`, `HTTPS`, `HTTP_STR_MATCH`, `HTTPS_STR_MATCH`, `TCP`, `CALCULATED`, `CLOUDWATCH_METRIC` and `RECOVERY_CONTROL`.
     */
    @JvmName("lktmumupfvcmwpee")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): HealthCheckArgs = HealthCheckArgs(
        childHealthThreshold = childHealthThreshold,
        childHealthchecks = childHealthchecks,
        cloudwatchAlarmName = cloudwatchAlarmName,
        cloudwatchAlarmRegion = cloudwatchAlarmRegion,
        disabled = disabled,
        enableSni = enableSni,
        failureThreshold = failureThreshold,
        fqdn = fqdn,
        insufficientDataHealthStatus = insufficientDataHealthStatus,
        invertHealthcheck = invertHealthcheck,
        ipAddress = ipAddress,
        measureLatency = measureLatency,
        port = port,
        referenceName = referenceName,
        regions = regions,
        requestInterval = requestInterval,
        resourcePath = resourcePath,
        routingControlArn = routingControlArn,
        searchString = searchString,
        tags = tags,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy