Class DnsServiceProps.Builder

java.lang.Object
software.amazon.awscdk.services.servicediscovery.DnsServiceProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<DnsServiceProps>
Enclosing interface:
DnsServiceProps

@Stability(Stable) public static final class DnsServiceProps.Builder extends Object implements software.amazon.jsii.Builder<DnsServiceProps>
A builder for DnsServiceProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • discoveryType

      @Stability(Stable) public DnsServiceProps.Builder discoveryType(DiscoveryType discoveryType)
      Parameters:
      discoveryType - Controls how instances within this service can be discovered.
      Returns:
      this
    • dnsRecordType

      @Stability(Stable) public DnsServiceProps.Builder dnsRecordType(DnsRecordType dnsRecordType)
      Parameters:
      dnsRecordType - 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.
      Returns:
      this
    • dnsTtl

      @Stability(Stable) public DnsServiceProps.Builder dnsTtl(Duration dnsTtl)
      Sets the value of DnsServiceProps.getDnsTtl()
      Parameters:
      dnsTtl - The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.
      Returns:
      this
    • loadBalancer

      @Stability(Stable) public DnsServiceProps.Builder loadBalancer(Boolean loadBalancer)
      Parameters:
      loadBalancer - 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.
      Returns:
      this
    • routingPolicy

      @Stability(Stable) public DnsServiceProps.Builder routingPolicy(RoutingPolicy routingPolicy)
      Parameters:
      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.
      Returns:
      this
    • customHealthCheck

      @Stability(Stable) public DnsServiceProps.Builder customHealthCheck(HealthCheckCustomConfig customHealthCheck)
      Parameters:
      customHealthCheck - Structure containing failure threshold for a custom health checker. Only one of healthCheckConfig or healthCheckCustomConfig can be specified. See: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html
      Returns:
      this
    • description

      @Stability(Stable) public DnsServiceProps.Builder description(String description)
      Parameters:
      description - A description of the service.
      Returns:
      this
    • healthCheck

      @Stability(Stable) public DnsServiceProps.Builder healthCheck(HealthCheckConfig healthCheck)
      Parameters:
      healthCheck - Settings for an optional health check. If you specify health check settings, AWS Cloud Map associates the health check with the records that you specify in DnsConfig. Only one of healthCheckConfig or healthCheckCustomConfig can be specified. Not valid for PrivateDnsNamespaces. If you use healthCheck, you can only register IP instances to this service.
      Returns:
      this
    • name

      @Stability(Stable) public DnsServiceProps.Builder name(String name)
      Sets the value of BaseServiceProps.getName()
      Parameters:
      name - A name for the Service.
      Returns:
      this
    • build

      @Stability(Stable) public DnsServiceProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<DnsServiceProps>
      Returns:
      a new instance of DnsServiceProps
      Throws:
      NullPointerException - if any required attribute was not provided