HealthCheckType

class aws_cdk.aws_servicediscovery.HealthCheckType(value)

Bases: Enum

ExampleMetadata:

lit=aws-servicediscovery/test/integ.service-with-http-namespace.lit.ts infused

Example:

import aws_cdk as cdk
import aws_cdk as servicediscovery

app = cdk.App()
stack = cdk.Stack(app, "aws-servicediscovery-integ")

namespace = servicediscovery.HttpNamespace(stack, "MyNamespace",
    name="MyHTTPNamespace"
)

service1 = namespace.create_service("NonIpService",
    description="service registering non-ip instances"
)

service1.register_non_ip_instance("NonIpInstance",
    custom_attributes={"arn": "arn:aws:s3:::mybucket"}
)

service2 = namespace.create_service("IpService",
    description="service registering ip instances",
    health_check=cdk.aws_servicediscovery.HealthCheckConfig(
        type=servicediscovery.HealthCheckType.HTTP,
        resource_path="/check"
    )
)

service2.register_ip_instance("IpInstance",
    ipv4="54.239.25.192"
)

app.synth()

Attributes

HTTP

Route 53 tries to establish a TCP connection.

If successful, Route 53 submits an HTTP request and waits for an HTTP status code of 200 or greater and less than 400.

HTTPS

Route 53 tries to establish a TCP connection.

If successful, Route 53 submits an HTTPS request and waits for an HTTP status code of 200 or greater and less than 400. If you specify HTTPS for the value of Type, the endpoint must support TLS v1.0 or later.

TCP

Route 53 tries to establish a TCP connection.

If you specify TCP for Type, don’t specify a value for ResourcePath.