Enum ServiceConnectAccessLogFormat

java.lang.Object
java.lang.Enum<ServiceConnectAccessLogFormat>
software.amazon.awscdk.services.ecs.ServiceConnectAccessLogFormat
All Implemented Interfaces:
Serializable, Comparable<ServiceConnectAccessLogFormat>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-04-24T20:29:27.963Z") @Stability(Stable) public enum ServiceConnectAccessLogFormat extends Enum<ServiceConnectAccessLogFormat>
The format of Service Connect access logs.

Example:

 Cluster cluster;
 TaskDefinition taskDefinition;
 FargateService service = FargateService.Builder.create(this, "Service")
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .serviceConnectConfiguration(ServiceConnectProps.builder()
                 .services(List.of(ServiceConnectService.builder()
                         .portMappingName("api")
                         .build()))
                 .accessLogConfiguration(ServiceConnectAccessLogConfiguration.builder()
                         .format(ServiceConnectAccessLogFormat.JSON)
                         .includeQueryParameters(true)
                         .build())
                 // When configuring access log,
                 // you also need to configure the log driver accordingly.
                 .logDriver(LogDrivers.awsLogs(AwsLogDriverProps.builder()
                         .streamPrefix("prefix")
                         .build()))
                 .build())
         .build();
 

See Also:
  • Enum Constant Details

    • TEXT

      @Stability(Stable) public static final ServiceConnectAccessLogFormat TEXT
      Human-readable text format for access logs.
    • JSON

      @Stability(Stable) public static final ServiceConnectAccessLogFormat JSON
      Structured JSON format for access logs.

      This format is well-suited for integration with log analysis tools.

  • Method Details

    • values

      public static ServiceConnectAccessLogFormat[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ServiceConnectAccessLogFormat valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null