Interface ServiceConnectProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ServiceConnectProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-15T10:24:58.869Z") @Stability(Stable) public interface ServiceConnectProps extends software.amazon.jsii.JsiiSerializable
Interface for Service Connect configuration.

Example:

 Cluster cluster;
 TaskDefinition taskDefinition;
 FargateService customService = FargateService.Builder.create(this, "CustomizedService")
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .serviceConnectConfiguration(ServiceConnectProps.builder()
                 .logDriver(LogDrivers.awsLogs(AwsLogDriverProps.builder()
                         .streamPrefix("sc-traffic")
                         .build()))
                 .services(List.of(ServiceConnectService.builder()
                         .portMappingName("api")
                         .dnsName("customized-api")
                         .port(80)
                         .ingressPortOverride(20040)
                         .discoveryName("custom")
                         .build()))
                 .build())
         .build();
 
  • Method Details

    • getLogDriver

      @Stability(Stable) @Nullable default LogDriver getLogDriver()
      The log driver configuration to use for the Service Connect agent logs.

      Default: - none

    • getNamespace

      @Stability(Stable) @Nullable default String getNamespace()
      The cloudmap namespace to register this service into.

      Default: the cloudmap namespace specified on the cluster.

    • getServices

      @Stability(Stable) @Nullable default List<ServiceConnectService> getServices()
      The list of Services, including a port mapping, terse client alias, and optional intermediate DNS name.

      This property may be left blank if the current ECS service does not need to advertise any ports via Service Connect.

      Default: none

    • builder

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