Class HealthCheckType
Inheritance
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class HealthCheckType : Enum
Syntax (vb)
Public NotInheritable Class HealthCheckType
Inherits
Enum
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-http-namespace.lit.ts infused
Examples
using Amazon.CDK;
using Amazon.CDK;
var app = new App();
var stack = new Stack(app, "aws-servicediscovery-integ");
var namespace = new HttpNamespace(stack, "MyNamespace", new HttpNamespaceProps {
Name = "MyHTTPNamespace"
});
var service1 = namespace.CreateService("NonIpService", new BaseServiceProps {
Description = "service registering non-ip instances"
});
service1.RegisterNonIpInstance("NonIpInstance", new NonIpInstanceBaseProps {
CustomAttributes = new Dictionary<string, string> { { "arn", "arn:aws:s3:::mybucket" } }
});
var service2 = namespace.CreateService("IpService", new BaseServiceProps {
Description = "service registering ip instances",
HealthCheck = new HealthCheckConfig {
Type = HealthCheckType.HTTP,
ResourcePath = "/check"
}
});
service2.RegisterIpInstance("IpInstance", new IpInstanceBaseProps {
Ipv4 = "54.239.25.192"
});
app.Synth();
Synopsis
Fields
HTTP | Route 53 tries to establish a TCP connection. |
HTTPS | Route 53 tries to establish a TCP connection. |
TCP | Route 53 tries to establish a TCP connection. |
value__ |
Fields
HTTP
Route 53 tries to establish a TCP connection.
public const HealthCheckType HTTP
Field Value
Type | Description |
---|---|
HealthCheckType |
Remarks
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.
public const HealthCheckType HTTPS
Field Value
Type | Description |
---|---|
HealthCheckType |
Remarks
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.
public const HealthCheckType TCP
Field Value
Type | Description |
---|---|
HealthCheckType |
Remarks
If you specify TCP for Type, don't specify a value for ResourcePath.
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |