Interface DnsServiceProps
- All Superinterfaces:
BaseServiceProps
,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
ServiceProps
- All Known Implementing Classes:
DnsServiceProps.Jsii$Proxy
,ServiceProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:45.625Z")
@Stability(Stable)
public interface DnsServiceProps
extends software.amazon.jsii.JsiiSerializable, BaseServiceProps
Service props needed to create a service in a given namespace.
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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forDnsServiceProps
static final class
An implementation forDnsServiceProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic DnsServiceProps.Builder
builder()
default DnsRecordType
The DNS type of the record that you want AWS Cloud Map to create.default Duration
The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.default Boolean
Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance.default RoutingPolicy
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.Methods inherited from interface software.amazon.awscdk.services.servicediscovery.BaseServiceProps
getCustomHealthCheck, getDescription, getHealthCheck, getName
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDnsRecordType
The DNS type of the record that you want AWS Cloud Map to create.Supported record types include A, AAAA, A and AAAA (A_AAAA), CNAME, and SRV.
Default: A
-
getDnsTtl
The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.Default: Duration.minutes(1)
-
getLoadBalancer
Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance.Setting this to
true
correctly configures theroutingPolicy
and performs some additional validation.Default: false
-
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.Default: WEIGHTED for CNAME records and when loadBalancer is true, MULTIVALUE otherwise
-
builder
- Returns:
- a
DnsServiceProps.Builder
ofDnsServiceProps
-