enum HealthCheckType
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ServiceDiscovery.HealthCheckType |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsservicediscovery#HealthCheckType |
![]() | software.amazon.awscdk.services.servicediscovery.HealthCheckType |
![]() | aws_cdk.aws_servicediscovery.HealthCheckType |
![]() | aws-cdk-lib » aws_servicediscovery » HealthCheckType |
Example
import * as cdk from '../../core';
import * as servicediscovery from '../lib';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-servicediscovery-integ');
const namespace = new servicediscovery.HttpNamespace(stack, 'MyNamespace', {
name: 'MyHTTPNamespace',
});
const service1 = namespace.createService('NonIpService', {
description: 'service registering non-ip instances',
});
service1.registerNonIpInstance('NonIpInstance', {
customAttributes: { arn: 'arn:aws:s3:::amzn-s3-demo-bucket' },
});
const service2 = namespace.createService('IpService', {
description: 'service registering ip instances',
healthCheck: {
type: servicediscovery.HealthCheckType.HTTP,
resourcePath: '/check',
},
});
service2.registerIpInstance('IpInstance', {
ipv4: '54.239.25.192',
});
app.synth();
Members
Name | Description |
---|---|
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. |
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.