Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a new health check.
For information about adding health checks to resource record sets, see 'ResourceRecordSet$HealthCheckId' in ChangeResourceRecordSets
.
ELB Load Balancers
If you're registering EC2 instances with an Elastic Load Balancing (ELB) load balancer, do not create Amazon Route 53 health checks for the EC2 instances. When you register an EC2 instance with a load balancer, you configure settings for an ELB health check, which performs a similar function to an Amazon Route 53 health check.
Private Hosted Zones
You can associate health checks with failover resource record sets in a private hosted zone. Note the following:
- Amazon Route 53 health checkers are outside the VPC. To check the health of an endpoint within a VPC by IP address, you must assign a public IP address to the instance in the VPC.
- You can configure a health checker to check the health of an external resource that the instance relies on, such as a database server.
- You can create a CloudWatch metric, associate an alarm with the metric, and then create a health check that is based on the state of the alarm. For example, you might create a CloudWatch metric that checks the status of the Amazon EC2
StatusCheckFailed
metric, add an alarm to the metric, and then create a health check that is based on the state of the alarm. For information about creating CloudWatch metrics and alarms by using the CloudWatch console, see the Amazon CloudWatch User Guide .
- createHealthCheck :: Text -> HealthCheckConfig -> CreateHealthCheck
- data CreateHealthCheck
- chcCallerReference :: Lens' CreateHealthCheck Text
- chcHealthCheckConfig :: Lens' CreateHealthCheck HealthCheckConfig
- createHealthCheckResponse :: Int -> HealthCheck -> Text -> CreateHealthCheckResponse
- data CreateHealthCheckResponse
- chcrsResponseStatus :: Lens' CreateHealthCheckResponse Int
- chcrsHealthCheck :: Lens' CreateHealthCheckResponse HealthCheck
- chcrsLocation :: Lens' CreateHealthCheckResponse Text
Creating a Request
Creates a value of CreateHealthCheck
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
chcCallerReference
- A unique string that identifies the request and that allows you to retry a failedCreateHealthCheck
request without the risk of creating two identical health checks: * If you send aCreateHealthCheck
request with the sameCallerReference
and settings as a previous request, and if the health check doesn't exist, Amazon Route 53 creates the health check. If the health check does exist, Amazon Route 53 returns the settings for the existing health check. * If you send aCreateHealthCheck
request with the sameCallerReference
as a deleted health check, regardless of the settings, Amazon Route 53 returns aHealthCheckAlreadyExists
error. * If you send aCreateHealthCheck
request with the sameCallerReference
as an existing health check but with different settings, Amazon Route 53 returns aHealthCheckAlreadyExists
error. * If you send aCreateHealthCheck
request with a uniqueCallerReference
but settings identical to an existing health check, Amazon Route 53 creates the health check.chcHealthCheckConfig
- A complex type that contains the response to aCreateHealthCheck
request.
data CreateHealthCheck Source #
A complex type that contains the health check request information.
See: createHealthCheck
smart constructor.
Request Lenses
chcCallerReference :: Lens' CreateHealthCheck Text Source #
A unique string that identifies the request and that allows you to retry a failed CreateHealthCheck
request without the risk of creating two identical health checks: * If you send a CreateHealthCheck
request with the same CallerReference
and settings as a previous request, and if the health check doesn't exist, Amazon Route 53 creates the health check. If the health check does exist, Amazon Route 53 returns the settings for the existing health check. * If you send a CreateHealthCheck
request with the same CallerReference
as a deleted health check, regardless of the settings, Amazon Route 53 returns a HealthCheckAlreadyExists
error. * If you send a CreateHealthCheck
request with the same CallerReference
as an existing health check but with different settings, Amazon Route 53 returns a HealthCheckAlreadyExists
error. * If you send a CreateHealthCheck
request with a unique CallerReference
but settings identical to an existing health check, Amazon Route 53 creates the health check.
chcHealthCheckConfig :: Lens' CreateHealthCheck HealthCheckConfig Source #
A complex type that contains the response to a CreateHealthCheck
request.
Destructuring the Response
createHealthCheckResponse Source #
:: Int | |
-> HealthCheck | |
-> Text | |
-> CreateHealthCheckResponse |
Creates a value of CreateHealthCheckResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
chcrsResponseStatus
- -- | The response status code.chcrsHealthCheck
- A complex type that contains identifying information about the health check.chcrsLocation
- The unique URL representing the new health check.
data CreateHealthCheckResponse Source #
A complex type containing the response information for the new health check.
See: createHealthCheckResponse
smart constructor.
Response Lenses
chcrsResponseStatus :: Lens' CreateHealthCheckResponse Int Source #
- - | The response status code.
chcrsHealthCheck :: Lens' CreateHealthCheckResponse HealthCheck Source #
A complex type that contains identifying information about the health check.
chcrsLocation :: Lens' CreateHealthCheckResponse Text Source #
The unique URL representing the new health check.