Interface IHealthCheckConfig
Settings for an optional Amazon Route 53 health check.
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IHealthCheckConfig
Syntax (vb)
Public Interface IHealthCheckConfig
Remarks
If you specify settings for a health check, AWS Cloud Map associates the health check with all the records that you specify in DnsConfig. Only valid with a PublicDnsNamespace.
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
Properties
FailureThreshold | The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa. |
ResourcePath | The path that you want Route 53 to request when performing health checks. |
Type | The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. |
Properties
FailureThreshold
The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.
virtual Nullable<double> FailureThreshold { get; }
Property Value
System.Nullable<System.Double>
Remarks
Default: 1
ResourcePath
The path that you want Route 53 to request when performing health checks.
virtual string ResourcePath { get; }
Property Value
System.String
Remarks
Do not use when health check type is TCP.
Default: '/'
Type
The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy.
virtual Nullable<HealthCheckType> Type { get; }
Property Value
System.Nullable<HealthCheckType>
Remarks
Cannot be modified once created. Supported values are HTTP, HTTPS, and TCP.
Default: HTTP