Interface DnsServiceProps

All Superinterfaces:
All Known Subinterfaces:
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, BaseServiceProps
Service props needed to create a service in a given namespace.

Used by createService() for PrivateDnsNamespace and PublicDnsNamespace


 App app = new App();
 Stack stack = new Stack(app, "aws-servicediscovery-integ");
 PublicDnsNamespace namespace = PublicDnsNamespace.Builder.create(stack, "Namespace")
 Service service = namespace.createService("Service", DnsServiceProps.builder()
 service.registerIpInstance("IpInstance", IpInstanceBaseProps.builder()
  • Method Details

    • getDnsRecordType

      @Stability(Stable) @Nullable default DnsRecordType 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

      @Stability(Stable) @Nullable default Duration getDnsTtl()
      The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.

      Default: Duration.minutes(1)

    • getLoadBalancer

      @Stability(Stable) @Nullable default Boolean getLoadBalancer()
      Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance.

      Setting this to true correctly configures the routingPolicy and performs some additional validation.

      Default: false

    • getRoutingPolicy

      @Stability(Stable) @Nullable 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.

      Default: WEIGHTED for CNAME records and when loadBalancer is true, MULTIVALUE otherwise

    • builder

      @Stability(Stable) static DnsServiceProps.Builder builder()
      a DnsServiceProps.Builder of DnsServiceProps