@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.573Z") @Stability(value=Stable) public abstract class ServiceDiscovery extends software.amazon.jsii.JsiiObject
Example:
// Example automatically generated from non-compiling source. May contain errors.
Mesh mesh;
Vpc vpc = new Vpc(this, "vpc");
PrivateDnsNamespace namespace = PrivateDnsNamespace.Builder.create(this, "test-namespace")
.vpc(vpc)
.name("domain.local")
.build();
Service service = namespace.createService("Svc");
VirtualNode node = mesh.addVirtualNode("virtual-node", VirtualNodeBaseProps.builder()
.serviceDiscovery(ServiceDiscovery.cloudMap(service))
.listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder()
.port(8081)
.healthCheck(HealthCheck.http(HttpHealthCheckOptions.builder()
.healthyThreshold(3)
.interval(Duration.seconds(5)) // minimum
.path("/health-check-path")
.timeout(Duration.seconds(2)) // minimum
.unhealthyThreshold(2)
.build()))
.build())))
.accessLog(AccessLog.fromFilePath("/dev/stdout"))
.build());
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceDiscovery() |
protected |
ServiceDiscovery(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ServiceDiscovery(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
abstract ServiceDiscoveryConfig |
bind(software.constructs.Construct scope)
Binds the current object when adding Service Discovery to a VirtualNode.
|
static ServiceDiscovery |
cloudMap(IService service)
Returns Cloud Map based service discovery.
|
static ServiceDiscovery |
cloudMap(IService service,
Map<String,String> instanceAttributes)
Returns Cloud Map based service discovery.
|
static ServiceDiscovery |
cloudMap(IService service,
Map<String,String> instanceAttributes,
IpPreference ipPreference)
Returns Cloud Map based service discovery.
|
static ServiceDiscovery |
dns(String hostname)
Returns DNS based service discovery.
|
static ServiceDiscovery |
dns(String hostname,
DnsResponseType responseType)
Returns DNS based service discovery.
|
static ServiceDiscovery |
dns(String hostname,
DnsResponseType responseType,
IpPreference ipPreference)
Returns DNS based service discovery.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected ServiceDiscovery(software.amazon.jsii.JsiiObjectRef objRef)
protected ServiceDiscovery(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected ServiceDiscovery()
@Stability(value=Stable) @NotNull public static ServiceDiscovery cloudMap(@NotNull IService service, @Nullable Map<String,String> instanceAttributes, @Nullable IpPreference ipPreference)
service - The AWS Cloud Map Service to use for service discovery. This parameter is required.instanceAttributes - A string map that contains attributes with values that you can use to filter instances by any custom attribute that you specified when you registered the instance.ipPreference - No IP preference is applied to the Virtual Node.@Stability(value=Stable) @NotNull public static ServiceDiscovery cloudMap(@NotNull IService service, @Nullable Map<String,String> instanceAttributes)
service - The AWS Cloud Map Service to use for service discovery. This parameter is required.instanceAttributes - A string map that contains attributes with values that you can use to filter instances by any custom attribute that you specified when you registered the instance.@Stability(value=Stable) @NotNull public static ServiceDiscovery cloudMap(@NotNull IService service)
service - The AWS Cloud Map Service to use for service discovery. This parameter is required.@Stability(value=Stable) @NotNull public static ServiceDiscovery dns(@NotNull String hostname, @Nullable DnsResponseType responseType, @Nullable IpPreference ipPreference)
hostname - This parameter is required.responseType - Specifies the DNS response type for the virtual node.ipPreference - No IP preference is applied to the Virtual Node.@Stability(value=Stable) @NotNull public static ServiceDiscovery dns(@NotNull String hostname, @Nullable DnsResponseType responseType)
hostname - This parameter is required.responseType - Specifies the DNS response type for the virtual node.@Stability(value=Stable) @NotNull public static ServiceDiscovery dns(@NotNull String hostname)
hostname - This parameter is required.@Stability(value=Stable) @NotNull public abstract ServiceDiscoveryConfig bind(@NotNull software.constructs.Construct scope)
scope - This parameter is required.Copyright © 2022. All rights reserved.