Interface ServiceConnectProps

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

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-13T16:55:08.708Z") @Stability(Stable) public interface ServiceConnectProps extends software.amazon.jsii.JsiiSerializable
Interface for Service Connect configuration.

Example:

 Cluster cluster;
 TaskDefinition taskDefinition;
 ContainerDefinitionOptions containerOptions;
 ContainerDefinition container = taskDefinition.addContainer("MyContainer", containerOptions);
 container.addPortMappings(PortMapping.builder()
         .name("api")
         .containerPort(8080)
         .build());
 cluster.addDefaultCloudMapNamespace(CloudMapNamespaceOptions.builder()
         .name("local")
         .build());
 FargateService service = FargateService.Builder.create(this, "Service")
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .minHealthyPercent(100)
         .serviceConnectConfiguration(ServiceConnectProps.builder()
                 .services(List.of(ServiceConnectService.builder()
                         .portMappingName("api")
                         .dnsName("http-api")
                         .port(80)
                         .build()))
                 .build())
         .build();
 
  • Method Details

    • getAccessLogConfiguration

      @Stability(Stable) @Nullable default ServiceConnectAccessLogConfiguration getAccessLogConfiguration()
      The configuration for Service Connect access logs.

      Access logs provide detailed telemetry about individual requests processed by the Service Connect proxy.

      Default: undefined - AWS ECS default is disabled, which means that access logs are not recorded

    • 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