Interface BaseServiceProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
DnsServiceProps, ServiceProps
All Known Implementing Classes:
BaseServiceProps.Jsii$Proxy, DnsServiceProps.Jsii$Proxy, ServiceProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:45.574Z") @Stability(Stable) public interface BaseServiceProps extends software.amazon.jsii.JsiiSerializable
Basic props needed to create a service in a given namespace.

Used by HttpNamespace.createService

Example:

 import software.amazon.awscdk.core.*;
 import software.amazon.awscdk.services.servicediscovery.*;
 App app = new App();
 Stack stack = new Stack(app, "aws-servicediscovery-integ");
 HttpNamespace namespace = HttpNamespace.Builder.create(stack, "MyNamespace")
         .name("covfefe")
         .build();
 Service service1 = namespace.createService("NonIpService", BaseServiceProps.builder()
         .description("service registering non-ip instances")
         .build());
 service1.registerNonIpInstance("NonIpInstance", NonIpInstanceBaseProps.builder()
         .customAttributes(Map.of("arn", "arn:aws:s3:::mybucket"))
         .build());
 Service service2 = namespace.createService("IpService", BaseServiceProps.builder()
         .description("service registering ip instances")
         .healthCheck(HealthCheckConfig.builder()
                 .type(HealthCheckType.HTTP)
                 .resourcePath("/check")
                 .build())
         .build());
 service2.registerIpInstance("IpInstance", IpInstanceBaseProps.builder()
         .ipv4("54.239.25.192")
         .build());
 app.synth();
 
  • Method Details

    • getCustomHealthCheck

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

      Default: none

    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      A description of the service.

      Default: none

    • getHealthCheck

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

      Default: none

    • getName

      @Stability(Stable) @Nullable default String getName()
      A name for the Service.

      Default: CloudFormation-generated name

    • builder

      @Stability(Stable) static BaseServiceProps.Builder builder()
      Returns:
      a BaseServiceProps.Builder of BaseServiceProps