@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:48.216Z") public interface DnsServiceProps extends BaseServiceProps
Used by createService() for PrivateDnsNamespace and PublicDnsNamespace
Example:
import software.amazon.awscdk.core.*; import software.amazon.awscdk.services.servicediscovery.*; 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 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 java.lang.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
default DnsRecordType getDnsRecordType()
Supported record types include A, AAAA, A and AAAA (A_AAAA), CNAME, and SRV.
Default: A
default Duration getDnsTtl()
Default: Duration.minutes(1)
default java.lang.Boolean getLoadBalancer()
Setting this to true
correctly configures the routingPolicy
and performs some additional validation.
Default: false
default RoutingPolicy getRoutingPolicy()
Default: WEIGHTED for CNAME records and when loadBalancer is true, MULTIVALUE otherwise
static DnsServiceProps.Builder builder()
builder
in interface BaseServiceProps
DnsServiceProps.Builder
of DnsServiceProps