@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.144Z") @Stability(value=Stable) public interface DnsServiceProps extends software.amazon.jsii.JsiiSerializable, BaseServiceProps
Used by createService() for PrivateDnsNamespace and PublicDnsNamespace
Example:
import software.amazon.awscdk.*;
import software.amazon.awscdk.*;
App app = new App();
Stack stack = new Stack(app, "aws-servicediscovery-integ");
PublicDnsNamespace namespace = PublicDnsNamespace.Builder.create(stack, "Namespace")
.name("foobar.com")
.build();
Service service = namespace.createService("Service", DnsServiceProps.builder()
.name("foo")
.dnsRecordType(DnsRecordType.A)
.dnsTtl(Duration.seconds(30))
.healthCheck(HealthCheckConfig.builder()
.type(HealthCheckType.HTTPS)
.resourcePath("/healthcheck")
.failureThreshold(2)
.build())
.build());
service.registerIpInstance("IpInstance", IpInstanceBaseProps.builder()
.ipv4("54.239.25.192")
.port(443)
.build());
app.synth();
| Modifier and Type | Interface and Description |
|---|---|
static class |
DnsServiceProps.Builder
A builder for
DnsServiceProps |
static class |
DnsServiceProps.Jsii$Proxy
An implementation for
DnsServiceProps |
| Modifier and Type | Method and Description |
|---|---|
static DnsServiceProps.Builder |
builder() |
default DiscoveryType |
getDiscoveryType()
Controls how instances within this service can be discovered.
|
default DnsRecordType |
getDnsRecordType()
The DNS type of the record that you want AWS Cloud Map to create.
|
default Duration |
getDnsTtl()
The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.
|
default Boolean |
getLoadBalancer()
Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance.
|
default RoutingPolicy |
getRoutingPolicy()
The routing policy that you want to apply to all DNS records that AWS Cloud Map creates when you register an instance and specify this service.
|
getCustomHealthCheck, getDescription, getHealthCheck, getName@Stability(value=Stable) @Nullable default DiscoveryType getDiscoveryType()
Default: DNS_AND_API
@Stability(value=Stable) @Nullable default DnsRecordType getDnsRecordType()
Supported record types include A, AAAA, A and AAAA (A_AAAA), CNAME, and SRV.
Default: A
@Stability(value=Stable) @Nullable default Duration getDnsTtl()
Default: Duration.minutes(1)
@Stability(value=Stable) @Nullable default Boolean getLoadBalancer()
Setting this to true correctly configures the routingPolicy
and performs some additional validation.
Default: false
@Stability(value=Stable) @Nullable default RoutingPolicy getRoutingPolicy()
Default: WEIGHTED for CNAME records and when loadBalancer is true, MULTIVALUE otherwise
@Stability(value=Stable) static DnsServiceProps.Builder builder()
builder in interface BaseServicePropsDnsServiceProps.Builder of DnsServicePropsCopyright © 2022. All rights reserved.