github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/route53/healthCheck.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package route53 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a Route53 health check. 16 // 17 // ## Example Usage 18 // 19 // ### Connectivity and HTTP Status Code Check 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := route53.NewHealthCheck(ctx, "example", &route53.HealthCheckArgs{ 35 // Fqdn: pulumi.String("example.com"), 36 // Port: pulumi.Int(80), 37 // Type: pulumi.String("HTTP"), 38 // ResourcePath: pulumi.String("/"), 39 // FailureThreshold: pulumi.Int(5), 40 // RequestInterval: pulumi.Int(30), 41 // Tags: pulumi.StringMap{ 42 // "Name": pulumi.String("tf-test-health-check"), 43 // }, 44 // }) 45 // if err != nil { 46 // return err 47 // } 48 // return nil 49 // }) 50 // } 51 // 52 // ``` 53 // <!--End PulumiCodeChooser --> 54 // 55 // ### Connectivity and String Matching Check 56 // 57 // <!--Start PulumiCodeChooser --> 58 // ```go 59 // package main 60 // 61 // import ( 62 // 63 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 64 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 65 // 66 // ) 67 // 68 // func main() { 69 // pulumi.Run(func(ctx *pulumi.Context) error { 70 // _, err := route53.NewHealthCheck(ctx, "example", &route53.HealthCheckArgs{ 71 // FailureThreshold: pulumi.Int(5), 72 // Fqdn: pulumi.String("example.com"), 73 // Port: pulumi.Int(443), 74 // RequestInterval: pulumi.Int(30), 75 // ResourcePath: pulumi.String("/"), 76 // SearchString: pulumi.String("example"), 77 // Type: pulumi.String("HTTPS_STR_MATCH"), 78 // }) 79 // if err != nil { 80 // return err 81 // } 82 // return nil 83 // }) 84 // } 85 // 86 // ``` 87 // <!--End PulumiCodeChooser --> 88 // 89 // ### Aggregate Check 90 // 91 // <!--Start PulumiCodeChooser --> 92 // ```go 93 // package main 94 // 95 // import ( 96 // 97 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 98 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 99 // 100 // ) 101 // 102 // func main() { 103 // pulumi.Run(func(ctx *pulumi.Context) error { 104 // _, err := route53.NewHealthCheck(ctx, "parent", &route53.HealthCheckArgs{ 105 // Type: pulumi.String("CALCULATED"), 106 // ChildHealthThreshold: pulumi.Int(1), 107 // ChildHealthchecks: pulumi.StringArray{ 108 // child.Id, 109 // }, 110 // Tags: pulumi.StringMap{ 111 // "Name": pulumi.String("tf-test-calculated-health-check"), 112 // }, 113 // }) 114 // if err != nil { 115 // return err 116 // } 117 // return nil 118 // }) 119 // } 120 // 121 // ``` 122 // <!--End PulumiCodeChooser --> 123 // 124 // ### CloudWatch Alarm Check 125 // 126 // <!--Start PulumiCodeChooser --> 127 // ```go 128 // package main 129 // 130 // import ( 131 // 132 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch" 133 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 134 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 135 // 136 // ) 137 // 138 // func main() { 139 // pulumi.Run(func(ctx *pulumi.Context) error { 140 // foobar, err := cloudwatch.NewMetricAlarm(ctx, "foobar", &cloudwatch.MetricAlarmArgs{ 141 // Name: pulumi.String("test-foobar5"), 142 // ComparisonOperator: pulumi.String("GreaterThanOrEqualToThreshold"), 143 // EvaluationPeriods: pulumi.Int(2), 144 // MetricName: pulumi.String("CPUUtilization"), 145 // Namespace: pulumi.String("AWS/EC2"), 146 // Period: pulumi.Int(120), 147 // Statistic: pulumi.String("Average"), 148 // Threshold: pulumi.Float64(80), 149 // AlarmDescription: pulumi.String("This metric monitors ec2 cpu utilization"), 150 // }) 151 // if err != nil { 152 // return err 153 // } 154 // _, err = route53.NewHealthCheck(ctx, "foo", &route53.HealthCheckArgs{ 155 // Type: pulumi.String("CLOUDWATCH_METRIC"), 156 // CloudwatchAlarmName: foobar.Name, 157 // CloudwatchAlarmRegion: pulumi.String("us-west-2"), 158 // InsufficientDataHealthStatus: pulumi.String("Healthy"), 159 // }) 160 // if err != nil { 161 // return err 162 // } 163 // return nil 164 // }) 165 // } 166 // 167 // ``` 168 // <!--End PulumiCodeChooser --> 169 // 170 // ## Import 171 // 172 // Using `pulumi import`, import Route53 Health Checks using the health check `id`. For example: 173 // 174 // ```sh 175 // $ pulumi import aws:route53/healthCheck:HealthCheck http_check abcdef11-2222-3333-4444-555555fedcba 176 // ``` 177 type HealthCheck struct { 178 pulumi.CustomResourceState 179 180 // The Amazon Resource Name (ARN) of the Health Check. 181 Arn pulumi.StringOutput `pulumi:"arn"` 182 // 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 183 ChildHealthThreshold pulumi.IntPtrOutput `pulumi:"childHealthThreshold"` 184 // For a specified parent health check, a list of HealthCheckId values for the associated child health checks. 185 ChildHealthchecks pulumi.StringArrayOutput `pulumi:"childHealthchecks"` 186 // The name of the CloudWatch alarm. 187 CloudwatchAlarmName pulumi.StringPtrOutput `pulumi:"cloudwatchAlarmName"` 188 // The CloudWatchRegion that the CloudWatch alarm was created in. 189 CloudwatchAlarmRegion pulumi.StringPtrOutput `pulumi:"cloudwatchAlarmRegion"` 190 // 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: 191 // * For health checks that check the health of endpoints, Route5 53 stops submitting requests to your application, server, or other resource. 192 // * For calculated health checks, Route 53 stops aggregating the status of the referenced health checks. 193 // * For health checks that monitor CloudWatch alarms, Route 53 stops monitoring the corresponding CloudWatch metrics. 194 // 195 // > **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 `invertHealthcheck`. 196 Disabled pulumi.BoolPtrOutput `pulumi:"disabled"` 197 // 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" `enableSni` defaults to `true`, when `type` is anything else `enableSni` defaults to `false`. 198 EnableSni pulumi.BoolOutput `pulumi:"enableSni"` 199 // The number of consecutive health checks that an endpoint must pass or fail. 200 FailureThreshold pulumi.IntOutput `pulumi:"failureThreshold"` 201 // The fully qualified domain name of the endpoint to be checked. If a value is set for `ipAddress`, the value set for `fqdn` will be passed in the `Host` header. 202 Fqdn pulumi.StringPtrOutput `pulumi:"fqdn"` 203 // The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`. 204 InsufficientDataHealthStatus pulumi.StringPtrOutput `pulumi:"insufficientDataHealthStatus"` 205 // 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. 206 InvertHealthcheck pulumi.BoolPtrOutput `pulumi:"invertHealthcheck"` 207 // The IP address of the endpoint to be checked. 208 IpAddress pulumi.StringPtrOutput `pulumi:"ipAddress"` 209 // 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. 210 MeasureLatency pulumi.BoolPtrOutput `pulumi:"measureLatency"` 211 // The port of the endpoint to be checked. 212 Port pulumi.IntPtrOutput `pulumi:"port"` 213 // This is a reference name used in Caller Reference 214 // (helpful for identifying single healthCheck set amongst others) 215 ReferenceName pulumi.StringPtrOutput `pulumi:"referenceName"` 216 // A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from. 217 Regions pulumi.StringArrayOutput `pulumi:"regions"` 218 // 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. 219 RequestInterval pulumi.IntPtrOutput `pulumi:"requestInterval"` 220 // The path that you want Amazon Route 53 to request when performing health checks. 221 ResourcePath pulumi.StringPtrOutput `pulumi:"resourcePath"` 222 // The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is `RECOVERY_CONTROL` 223 RoutingControlArn pulumi.StringPtrOutput `pulumi:"routingControlArn"` 224 // 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`. 225 SearchString pulumi.StringPtrOutput `pulumi:"searchString"` 226 // A map of tags to assign to the health check. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 227 Tags pulumi.StringMapOutput `pulumi:"tags"` 228 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 229 // 230 // Deprecated: Please use `tags` instead. 231 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 232 // 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`. 233 Type pulumi.StringOutput `pulumi:"type"` 234 } 235 236 // NewHealthCheck registers a new resource with the given unique name, arguments, and options. 237 func NewHealthCheck(ctx *pulumi.Context, 238 name string, args *HealthCheckArgs, opts ...pulumi.ResourceOption) (*HealthCheck, error) { 239 if args == nil { 240 return nil, errors.New("missing one or more required arguments") 241 } 242 243 if args.Type == nil { 244 return nil, errors.New("invalid value for required argument 'Type'") 245 } 246 opts = internal.PkgResourceDefaultOpts(opts) 247 var resource HealthCheck 248 err := ctx.RegisterResource("aws:route53/healthCheck:HealthCheck", name, args, &resource, opts...) 249 if err != nil { 250 return nil, err 251 } 252 return &resource, nil 253 } 254 255 // GetHealthCheck gets an existing HealthCheck resource's state with the given name, ID, and optional 256 // state properties that are used to uniquely qualify the lookup (nil if not required). 257 func GetHealthCheck(ctx *pulumi.Context, 258 name string, id pulumi.IDInput, state *HealthCheckState, opts ...pulumi.ResourceOption) (*HealthCheck, error) { 259 var resource HealthCheck 260 err := ctx.ReadResource("aws:route53/healthCheck:HealthCheck", name, id, state, &resource, opts...) 261 if err != nil { 262 return nil, err 263 } 264 return &resource, nil 265 } 266 267 // Input properties used for looking up and filtering HealthCheck resources. 268 type healthCheckState struct { 269 // The Amazon Resource Name (ARN) of the Health Check. 270 Arn *string `pulumi:"arn"` 271 // 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 272 ChildHealthThreshold *int `pulumi:"childHealthThreshold"` 273 // For a specified parent health check, a list of HealthCheckId values for the associated child health checks. 274 ChildHealthchecks []string `pulumi:"childHealthchecks"` 275 // The name of the CloudWatch alarm. 276 CloudwatchAlarmName *string `pulumi:"cloudwatchAlarmName"` 277 // The CloudWatchRegion that the CloudWatch alarm was created in. 278 CloudwatchAlarmRegion *string `pulumi:"cloudwatchAlarmRegion"` 279 // 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: 280 // * For health checks that check the health of endpoints, Route5 53 stops submitting requests to your application, server, or other resource. 281 // * For calculated health checks, Route 53 stops aggregating the status of the referenced health checks. 282 // * For health checks that monitor CloudWatch alarms, Route 53 stops monitoring the corresponding CloudWatch metrics. 283 // 284 // > **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 `invertHealthcheck`. 285 Disabled *bool `pulumi:"disabled"` 286 // 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" `enableSni` defaults to `true`, when `type` is anything else `enableSni` defaults to `false`. 287 EnableSni *bool `pulumi:"enableSni"` 288 // The number of consecutive health checks that an endpoint must pass or fail. 289 FailureThreshold *int `pulumi:"failureThreshold"` 290 // The fully qualified domain name of the endpoint to be checked. If a value is set for `ipAddress`, the value set for `fqdn` will be passed in the `Host` header. 291 Fqdn *string `pulumi:"fqdn"` 292 // The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`. 293 InsufficientDataHealthStatus *string `pulumi:"insufficientDataHealthStatus"` 294 // 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. 295 InvertHealthcheck *bool `pulumi:"invertHealthcheck"` 296 // The IP address of the endpoint to be checked. 297 IpAddress *string `pulumi:"ipAddress"` 298 // 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. 299 MeasureLatency *bool `pulumi:"measureLatency"` 300 // The port of the endpoint to be checked. 301 Port *int `pulumi:"port"` 302 // This is a reference name used in Caller Reference 303 // (helpful for identifying single healthCheck set amongst others) 304 ReferenceName *string `pulumi:"referenceName"` 305 // A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from. 306 Regions []string `pulumi:"regions"` 307 // 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. 308 RequestInterval *int `pulumi:"requestInterval"` 309 // The path that you want Amazon Route 53 to request when performing health checks. 310 ResourcePath *string `pulumi:"resourcePath"` 311 // The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is `RECOVERY_CONTROL` 312 RoutingControlArn *string `pulumi:"routingControlArn"` 313 // 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`. 314 SearchString *string `pulumi:"searchString"` 315 // A map of tags to assign to the health check. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 316 Tags map[string]string `pulumi:"tags"` 317 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 318 // 319 // Deprecated: Please use `tags` instead. 320 TagsAll map[string]string `pulumi:"tagsAll"` 321 // 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`. 322 Type *string `pulumi:"type"` 323 } 324 325 type HealthCheckState struct { 326 // The Amazon Resource Name (ARN) of the Health Check. 327 Arn pulumi.StringPtrInput 328 // 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 329 ChildHealthThreshold pulumi.IntPtrInput 330 // For a specified parent health check, a list of HealthCheckId values for the associated child health checks. 331 ChildHealthchecks pulumi.StringArrayInput 332 // The name of the CloudWatch alarm. 333 CloudwatchAlarmName pulumi.StringPtrInput 334 // The CloudWatchRegion that the CloudWatch alarm was created in. 335 CloudwatchAlarmRegion pulumi.StringPtrInput 336 // 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: 337 // * For health checks that check the health of endpoints, Route5 53 stops submitting requests to your application, server, or other resource. 338 // * For calculated health checks, Route 53 stops aggregating the status of the referenced health checks. 339 // * For health checks that monitor CloudWatch alarms, Route 53 stops monitoring the corresponding CloudWatch metrics. 340 // 341 // > **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 `invertHealthcheck`. 342 Disabled pulumi.BoolPtrInput 343 // 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" `enableSni` defaults to `true`, when `type` is anything else `enableSni` defaults to `false`. 344 EnableSni pulumi.BoolPtrInput 345 // The number of consecutive health checks that an endpoint must pass or fail. 346 FailureThreshold pulumi.IntPtrInput 347 // The fully qualified domain name of the endpoint to be checked. If a value is set for `ipAddress`, the value set for `fqdn` will be passed in the `Host` header. 348 Fqdn pulumi.StringPtrInput 349 // The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`. 350 InsufficientDataHealthStatus pulumi.StringPtrInput 351 // 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. 352 InvertHealthcheck pulumi.BoolPtrInput 353 // The IP address of the endpoint to be checked. 354 IpAddress pulumi.StringPtrInput 355 // 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. 356 MeasureLatency pulumi.BoolPtrInput 357 // The port of the endpoint to be checked. 358 Port pulumi.IntPtrInput 359 // This is a reference name used in Caller Reference 360 // (helpful for identifying single healthCheck set amongst others) 361 ReferenceName pulumi.StringPtrInput 362 // A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from. 363 Regions pulumi.StringArrayInput 364 // 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. 365 RequestInterval pulumi.IntPtrInput 366 // The path that you want Amazon Route 53 to request when performing health checks. 367 ResourcePath pulumi.StringPtrInput 368 // The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is `RECOVERY_CONTROL` 369 RoutingControlArn pulumi.StringPtrInput 370 // 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`. 371 SearchString pulumi.StringPtrInput 372 // A map of tags to assign to the health check. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 373 Tags pulumi.StringMapInput 374 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 375 // 376 // Deprecated: Please use `tags` instead. 377 TagsAll pulumi.StringMapInput 378 // 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`. 379 Type pulumi.StringPtrInput 380 } 381 382 func (HealthCheckState) ElementType() reflect.Type { 383 return reflect.TypeOf((*healthCheckState)(nil)).Elem() 384 } 385 386 type healthCheckArgs struct { 387 // 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 388 ChildHealthThreshold *int `pulumi:"childHealthThreshold"` 389 // For a specified parent health check, a list of HealthCheckId values for the associated child health checks. 390 ChildHealthchecks []string `pulumi:"childHealthchecks"` 391 // The name of the CloudWatch alarm. 392 CloudwatchAlarmName *string `pulumi:"cloudwatchAlarmName"` 393 // The CloudWatchRegion that the CloudWatch alarm was created in. 394 CloudwatchAlarmRegion *string `pulumi:"cloudwatchAlarmRegion"` 395 // 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: 396 // * For health checks that check the health of endpoints, Route5 53 stops submitting requests to your application, server, or other resource. 397 // * For calculated health checks, Route 53 stops aggregating the status of the referenced health checks. 398 // * For health checks that monitor CloudWatch alarms, Route 53 stops monitoring the corresponding CloudWatch metrics. 399 // 400 // > **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 `invertHealthcheck`. 401 Disabled *bool `pulumi:"disabled"` 402 // 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" `enableSni` defaults to `true`, when `type` is anything else `enableSni` defaults to `false`. 403 EnableSni *bool `pulumi:"enableSni"` 404 // The number of consecutive health checks that an endpoint must pass or fail. 405 FailureThreshold *int `pulumi:"failureThreshold"` 406 // The fully qualified domain name of the endpoint to be checked. If a value is set for `ipAddress`, the value set for `fqdn` will be passed in the `Host` header. 407 Fqdn *string `pulumi:"fqdn"` 408 // The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`. 409 InsufficientDataHealthStatus *string `pulumi:"insufficientDataHealthStatus"` 410 // 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. 411 InvertHealthcheck *bool `pulumi:"invertHealthcheck"` 412 // The IP address of the endpoint to be checked. 413 IpAddress *string `pulumi:"ipAddress"` 414 // 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. 415 MeasureLatency *bool `pulumi:"measureLatency"` 416 // The port of the endpoint to be checked. 417 Port *int `pulumi:"port"` 418 // This is a reference name used in Caller Reference 419 // (helpful for identifying single healthCheck set amongst others) 420 ReferenceName *string `pulumi:"referenceName"` 421 // A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from. 422 Regions []string `pulumi:"regions"` 423 // 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. 424 RequestInterval *int `pulumi:"requestInterval"` 425 // The path that you want Amazon Route 53 to request when performing health checks. 426 ResourcePath *string `pulumi:"resourcePath"` 427 // The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is `RECOVERY_CONTROL` 428 RoutingControlArn *string `pulumi:"routingControlArn"` 429 // 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`. 430 SearchString *string `pulumi:"searchString"` 431 // A map of tags to assign to the health check. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 432 Tags map[string]string `pulumi:"tags"` 433 // 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`. 434 Type string `pulumi:"type"` 435 } 436 437 // The set of arguments for constructing a HealthCheck resource. 438 type HealthCheckArgs struct { 439 // 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 440 ChildHealthThreshold pulumi.IntPtrInput 441 // For a specified parent health check, a list of HealthCheckId values for the associated child health checks. 442 ChildHealthchecks pulumi.StringArrayInput 443 // The name of the CloudWatch alarm. 444 CloudwatchAlarmName pulumi.StringPtrInput 445 // The CloudWatchRegion that the CloudWatch alarm was created in. 446 CloudwatchAlarmRegion pulumi.StringPtrInput 447 // 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: 448 // * For health checks that check the health of endpoints, Route5 53 stops submitting requests to your application, server, or other resource. 449 // * For calculated health checks, Route 53 stops aggregating the status of the referenced health checks. 450 // * For health checks that monitor CloudWatch alarms, Route 53 stops monitoring the corresponding CloudWatch metrics. 451 // 452 // > **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 `invertHealthcheck`. 453 Disabled pulumi.BoolPtrInput 454 // 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" `enableSni` defaults to `true`, when `type` is anything else `enableSni` defaults to `false`. 455 EnableSni pulumi.BoolPtrInput 456 // The number of consecutive health checks that an endpoint must pass or fail. 457 FailureThreshold pulumi.IntPtrInput 458 // The fully qualified domain name of the endpoint to be checked. If a value is set for `ipAddress`, the value set for `fqdn` will be passed in the `Host` header. 459 Fqdn pulumi.StringPtrInput 460 // The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`. 461 InsufficientDataHealthStatus pulumi.StringPtrInput 462 // 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. 463 InvertHealthcheck pulumi.BoolPtrInput 464 // The IP address of the endpoint to be checked. 465 IpAddress pulumi.StringPtrInput 466 // 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. 467 MeasureLatency pulumi.BoolPtrInput 468 // The port of the endpoint to be checked. 469 Port pulumi.IntPtrInput 470 // This is a reference name used in Caller Reference 471 // (helpful for identifying single healthCheck set amongst others) 472 ReferenceName pulumi.StringPtrInput 473 // A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from. 474 Regions pulumi.StringArrayInput 475 // 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. 476 RequestInterval pulumi.IntPtrInput 477 // The path that you want Amazon Route 53 to request when performing health checks. 478 ResourcePath pulumi.StringPtrInput 479 // The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is `RECOVERY_CONTROL` 480 RoutingControlArn pulumi.StringPtrInput 481 // 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`. 482 SearchString pulumi.StringPtrInput 483 // A map of tags to assign to the health check. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 484 Tags pulumi.StringMapInput 485 // 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`. 486 Type pulumi.StringInput 487 } 488 489 func (HealthCheckArgs) ElementType() reflect.Type { 490 return reflect.TypeOf((*healthCheckArgs)(nil)).Elem() 491 } 492 493 type HealthCheckInput interface { 494 pulumi.Input 495 496 ToHealthCheckOutput() HealthCheckOutput 497 ToHealthCheckOutputWithContext(ctx context.Context) HealthCheckOutput 498 } 499 500 func (*HealthCheck) ElementType() reflect.Type { 501 return reflect.TypeOf((**HealthCheck)(nil)).Elem() 502 } 503 504 func (i *HealthCheck) ToHealthCheckOutput() HealthCheckOutput { 505 return i.ToHealthCheckOutputWithContext(context.Background()) 506 } 507 508 func (i *HealthCheck) ToHealthCheckOutputWithContext(ctx context.Context) HealthCheckOutput { 509 return pulumi.ToOutputWithContext(ctx, i).(HealthCheckOutput) 510 } 511 512 // HealthCheckArrayInput is an input type that accepts HealthCheckArray and HealthCheckArrayOutput values. 513 // You can construct a concrete instance of `HealthCheckArrayInput` via: 514 // 515 // HealthCheckArray{ HealthCheckArgs{...} } 516 type HealthCheckArrayInput interface { 517 pulumi.Input 518 519 ToHealthCheckArrayOutput() HealthCheckArrayOutput 520 ToHealthCheckArrayOutputWithContext(context.Context) HealthCheckArrayOutput 521 } 522 523 type HealthCheckArray []HealthCheckInput 524 525 func (HealthCheckArray) ElementType() reflect.Type { 526 return reflect.TypeOf((*[]*HealthCheck)(nil)).Elem() 527 } 528 529 func (i HealthCheckArray) ToHealthCheckArrayOutput() HealthCheckArrayOutput { 530 return i.ToHealthCheckArrayOutputWithContext(context.Background()) 531 } 532 533 func (i HealthCheckArray) ToHealthCheckArrayOutputWithContext(ctx context.Context) HealthCheckArrayOutput { 534 return pulumi.ToOutputWithContext(ctx, i).(HealthCheckArrayOutput) 535 } 536 537 // HealthCheckMapInput is an input type that accepts HealthCheckMap and HealthCheckMapOutput values. 538 // You can construct a concrete instance of `HealthCheckMapInput` via: 539 // 540 // HealthCheckMap{ "key": HealthCheckArgs{...} } 541 type HealthCheckMapInput interface { 542 pulumi.Input 543 544 ToHealthCheckMapOutput() HealthCheckMapOutput 545 ToHealthCheckMapOutputWithContext(context.Context) HealthCheckMapOutput 546 } 547 548 type HealthCheckMap map[string]HealthCheckInput 549 550 func (HealthCheckMap) ElementType() reflect.Type { 551 return reflect.TypeOf((*map[string]*HealthCheck)(nil)).Elem() 552 } 553 554 func (i HealthCheckMap) ToHealthCheckMapOutput() HealthCheckMapOutput { 555 return i.ToHealthCheckMapOutputWithContext(context.Background()) 556 } 557 558 func (i HealthCheckMap) ToHealthCheckMapOutputWithContext(ctx context.Context) HealthCheckMapOutput { 559 return pulumi.ToOutputWithContext(ctx, i).(HealthCheckMapOutput) 560 } 561 562 type HealthCheckOutput struct{ *pulumi.OutputState } 563 564 func (HealthCheckOutput) ElementType() reflect.Type { 565 return reflect.TypeOf((**HealthCheck)(nil)).Elem() 566 } 567 568 func (o HealthCheckOutput) ToHealthCheckOutput() HealthCheckOutput { 569 return o 570 } 571 572 func (o HealthCheckOutput) ToHealthCheckOutputWithContext(ctx context.Context) HealthCheckOutput { 573 return o 574 } 575 576 // The Amazon Resource Name (ARN) of the Health Check. 577 func (o HealthCheckOutput) Arn() pulumi.StringOutput { 578 return o.ApplyT(func(v *HealthCheck) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 579 } 580 581 // 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 582 func (o HealthCheckOutput) ChildHealthThreshold() pulumi.IntPtrOutput { 583 return o.ApplyT(func(v *HealthCheck) pulumi.IntPtrOutput { return v.ChildHealthThreshold }).(pulumi.IntPtrOutput) 584 } 585 586 // For a specified parent health check, a list of HealthCheckId values for the associated child health checks. 587 func (o HealthCheckOutput) ChildHealthchecks() pulumi.StringArrayOutput { 588 return o.ApplyT(func(v *HealthCheck) pulumi.StringArrayOutput { return v.ChildHealthchecks }).(pulumi.StringArrayOutput) 589 } 590 591 // The name of the CloudWatch alarm. 592 func (o HealthCheckOutput) CloudwatchAlarmName() pulumi.StringPtrOutput { 593 return o.ApplyT(func(v *HealthCheck) pulumi.StringPtrOutput { return v.CloudwatchAlarmName }).(pulumi.StringPtrOutput) 594 } 595 596 // The CloudWatchRegion that the CloudWatch alarm was created in. 597 func (o HealthCheckOutput) CloudwatchAlarmRegion() pulumi.StringPtrOutput { 598 return o.ApplyT(func(v *HealthCheck) pulumi.StringPtrOutput { return v.CloudwatchAlarmRegion }).(pulumi.StringPtrOutput) 599 } 600 601 // 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: 602 // * For health checks that check the health of endpoints, Route5 53 stops submitting requests to your application, server, or other resource. 603 // * For calculated health checks, Route 53 stops aggregating the status of the referenced health checks. 604 // * For health checks that monitor CloudWatch alarms, Route 53 stops monitoring the corresponding CloudWatch metrics. 605 // 606 // > **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 `invertHealthcheck`. 607 func (o HealthCheckOutput) Disabled() pulumi.BoolPtrOutput { 608 return o.ApplyT(func(v *HealthCheck) pulumi.BoolPtrOutput { return v.Disabled }).(pulumi.BoolPtrOutput) 609 } 610 611 // 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" `enableSni` defaults to `true`, when `type` is anything else `enableSni` defaults to `false`. 612 func (o HealthCheckOutput) EnableSni() pulumi.BoolOutput { 613 return o.ApplyT(func(v *HealthCheck) pulumi.BoolOutput { return v.EnableSni }).(pulumi.BoolOutput) 614 } 615 616 // The number of consecutive health checks that an endpoint must pass or fail. 617 func (o HealthCheckOutput) FailureThreshold() pulumi.IntOutput { 618 return o.ApplyT(func(v *HealthCheck) pulumi.IntOutput { return v.FailureThreshold }).(pulumi.IntOutput) 619 } 620 621 // The fully qualified domain name of the endpoint to be checked. If a value is set for `ipAddress`, the value set for `fqdn` will be passed in the `Host` header. 622 func (o HealthCheckOutput) Fqdn() pulumi.StringPtrOutput { 623 return o.ApplyT(func(v *HealthCheck) pulumi.StringPtrOutput { return v.Fqdn }).(pulumi.StringPtrOutput) 624 } 625 626 // The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`. 627 func (o HealthCheckOutput) InsufficientDataHealthStatus() pulumi.StringPtrOutput { 628 return o.ApplyT(func(v *HealthCheck) pulumi.StringPtrOutput { return v.InsufficientDataHealthStatus }).(pulumi.StringPtrOutput) 629 } 630 631 // 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. 632 func (o HealthCheckOutput) InvertHealthcheck() pulumi.BoolPtrOutput { 633 return o.ApplyT(func(v *HealthCheck) pulumi.BoolPtrOutput { return v.InvertHealthcheck }).(pulumi.BoolPtrOutput) 634 } 635 636 // The IP address of the endpoint to be checked. 637 func (o HealthCheckOutput) IpAddress() pulumi.StringPtrOutput { 638 return o.ApplyT(func(v *HealthCheck) pulumi.StringPtrOutput { return v.IpAddress }).(pulumi.StringPtrOutput) 639 } 640 641 // 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. 642 func (o HealthCheckOutput) MeasureLatency() pulumi.BoolPtrOutput { 643 return o.ApplyT(func(v *HealthCheck) pulumi.BoolPtrOutput { return v.MeasureLatency }).(pulumi.BoolPtrOutput) 644 } 645 646 // The port of the endpoint to be checked. 647 func (o HealthCheckOutput) Port() pulumi.IntPtrOutput { 648 return o.ApplyT(func(v *HealthCheck) pulumi.IntPtrOutput { return v.Port }).(pulumi.IntPtrOutput) 649 } 650 651 // This is a reference name used in Caller Reference 652 // (helpful for identifying single healthCheck set amongst others) 653 func (o HealthCheckOutput) ReferenceName() pulumi.StringPtrOutput { 654 return o.ApplyT(func(v *HealthCheck) pulumi.StringPtrOutput { return v.ReferenceName }).(pulumi.StringPtrOutput) 655 } 656 657 // A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from. 658 func (o HealthCheckOutput) Regions() pulumi.StringArrayOutput { 659 return o.ApplyT(func(v *HealthCheck) pulumi.StringArrayOutput { return v.Regions }).(pulumi.StringArrayOutput) 660 } 661 662 // 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. 663 func (o HealthCheckOutput) RequestInterval() pulumi.IntPtrOutput { 664 return o.ApplyT(func(v *HealthCheck) pulumi.IntPtrOutput { return v.RequestInterval }).(pulumi.IntPtrOutput) 665 } 666 667 // The path that you want Amazon Route 53 to request when performing health checks. 668 func (o HealthCheckOutput) ResourcePath() pulumi.StringPtrOutput { 669 return o.ApplyT(func(v *HealthCheck) pulumi.StringPtrOutput { return v.ResourcePath }).(pulumi.StringPtrOutput) 670 } 671 672 // The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is `RECOVERY_CONTROL` 673 func (o HealthCheckOutput) RoutingControlArn() pulumi.StringPtrOutput { 674 return o.ApplyT(func(v *HealthCheck) pulumi.StringPtrOutput { return v.RoutingControlArn }).(pulumi.StringPtrOutput) 675 } 676 677 // 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`. 678 func (o HealthCheckOutput) SearchString() pulumi.StringPtrOutput { 679 return o.ApplyT(func(v *HealthCheck) pulumi.StringPtrOutput { return v.SearchString }).(pulumi.StringPtrOutput) 680 } 681 682 // A map of tags to assign to the health check. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 683 func (o HealthCheckOutput) Tags() pulumi.StringMapOutput { 684 return o.ApplyT(func(v *HealthCheck) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 685 } 686 687 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 688 // 689 // Deprecated: Please use `tags` instead. 690 func (o HealthCheckOutput) TagsAll() pulumi.StringMapOutput { 691 return o.ApplyT(func(v *HealthCheck) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 692 } 693 694 // 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`. 695 func (o HealthCheckOutput) Type() pulumi.StringOutput { 696 return o.ApplyT(func(v *HealthCheck) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) 697 } 698 699 type HealthCheckArrayOutput struct{ *pulumi.OutputState } 700 701 func (HealthCheckArrayOutput) ElementType() reflect.Type { 702 return reflect.TypeOf((*[]*HealthCheck)(nil)).Elem() 703 } 704 705 func (o HealthCheckArrayOutput) ToHealthCheckArrayOutput() HealthCheckArrayOutput { 706 return o 707 } 708 709 func (o HealthCheckArrayOutput) ToHealthCheckArrayOutputWithContext(ctx context.Context) HealthCheckArrayOutput { 710 return o 711 } 712 713 func (o HealthCheckArrayOutput) Index(i pulumi.IntInput) HealthCheckOutput { 714 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HealthCheck { 715 return vs[0].([]*HealthCheck)[vs[1].(int)] 716 }).(HealthCheckOutput) 717 } 718 719 type HealthCheckMapOutput struct{ *pulumi.OutputState } 720 721 func (HealthCheckMapOutput) ElementType() reflect.Type { 722 return reflect.TypeOf((*map[string]*HealthCheck)(nil)).Elem() 723 } 724 725 func (o HealthCheckMapOutput) ToHealthCheckMapOutput() HealthCheckMapOutput { 726 return o 727 } 728 729 func (o HealthCheckMapOutput) ToHealthCheckMapOutputWithContext(ctx context.Context) HealthCheckMapOutput { 730 return o 731 } 732 733 func (o HealthCheckMapOutput) MapIndex(k pulumi.StringInput) HealthCheckOutput { 734 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HealthCheck { 735 return vs[0].(map[string]*HealthCheck)[vs[1].(string)] 736 }).(HealthCheckOutput) 737 } 738 739 func init() { 740 pulumi.RegisterInputType(reflect.TypeOf((*HealthCheckInput)(nil)).Elem(), &HealthCheck{}) 741 pulumi.RegisterInputType(reflect.TypeOf((*HealthCheckArrayInput)(nil)).Elem(), HealthCheckArray{}) 742 pulumi.RegisterInputType(reflect.TypeOf((*HealthCheckMapInput)(nil)).Elem(), HealthCheckMap{}) 743 pulumi.RegisterOutputType(HealthCheckOutput{}) 744 pulumi.RegisterOutputType(HealthCheckArrayOutput{}) 745 pulumi.RegisterOutputType(HealthCheckMapOutput{}) 746 }