Class HealthCheck
Contains static factory methods for creating health checks for different protocols.
Inheritance
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class HealthCheck : DeputyBase
Syntax (vb)
Public MustInherit Class HealthCheck
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
Mesh mesh;
var vpc = new Vpc(this, "vpc");
var namespace = new PrivateDnsNamespace(this, "test-namespace", new PrivateDnsNamespaceProps {
Vpc = vpc,
Name = "domain.local"
});
var service = namespace.CreateService("Svc");
var node = mesh.AddVirtualNode("virtual-node", new VirtualNodeBaseProps {
ServiceDiscovery = ServiceDiscovery.CloudMap(service),
Listeners = new [] { VirtualNodeListener.Http(new HttpVirtualNodeListenerOptions {
Port = 8081,
HealthCheck = HealthCheck.Http(new HttpHealthCheckOptions {
HealthyThreshold = 3,
Interval = Duration.Seconds(5), // minimum
Path = "/health-check-path",
Timeout = Duration.Seconds(2), // minimum
UnhealthyThreshold = 2
})
}) },
AccessLog = AccessLog.FromFilePath("/dev/stdout")
});
Synopsis
Constructors
HealthCheck() | |
HealthCheck(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HealthCheck(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, IHealthCheckBindOptions) | Called when the AccessLog type is initialized. |
Grpc(IGrpcHealthCheckOptions) | Construct a GRPC health check. |
Http(IHttpHealthCheckOptions) | Construct a HTTP health check. |
Http2(IHttpHealthCheckOptions) | Construct a HTTP2 health check. |
Tcp(ITcpHealthCheckOptions) | Construct a TCP health check. |
Constructors
HealthCheck()
protected HealthCheck()
HealthCheck(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HealthCheck(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HealthCheck(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HealthCheck(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, IHealthCheckBindOptions)
Called when the AccessLog type is initialized.
public abstract IHealthCheckConfig Bind(Construct scope, IHealthCheckBindOptions options)
Parameters
- scope Constructs.Construct
- options IHealthCheckBindOptions
Returns
Remarks
Can be used to enforce mutual exclusivity with future properties
Grpc(IGrpcHealthCheckOptions)
Construct a GRPC health check.
public static HealthCheck Grpc(IGrpcHealthCheckOptions options = null)
Parameters
- options IGrpcHealthCheckOptions
Returns
Http(IHttpHealthCheckOptions)
Construct a HTTP health check.
public static HealthCheck Http(IHttpHealthCheckOptions options = null)
Parameters
- options IHttpHealthCheckOptions
Returns
Http2(IHttpHealthCheckOptions)
Construct a HTTP2 health check.
public static HealthCheck Http2(IHttpHealthCheckOptions options = null)
Parameters
- options IHttpHealthCheckOptions
Returns
Tcp(ITcpHealthCheckOptions)
Construct a TCP health check.
public static HealthCheck Tcp(ITcpHealthCheckOptions options = null)
Parameters
- options ITcpHealthCheckOptions
Returns